IRequest.UserLogin method
用户登录,调用此方法后系统将计算此用户的Token并存储在cookie中,同时此方法将返回用户Token,用于REST Api以及其他场景中。
public string UserLogin(string userName, bool isAutoLogin)
parameter | description |
---|---|
userName | 登录用户的用户名。 |
isAutoLogin | 是否下次自动登录。 如果设置为 true,则登录cookie将保留7天;否则当浏览器关闭时系统将清除登录cookie。 |
Return Value
返回此用户的Token,7天内可用。
See Also
- interface IRequest
- namespace SiteServer.Plugin