Documentation ¶
Index ¶
- func AuthenticationInfo(user *user.Data) map[string]interface{}
- func CheckSign(token string, req *http.Request) error
- func CreateSign(token string, expire int, params map[string]string) (string, string)
- func NormalInfo(user *user.Data) map[string]interface{}
- type Controller
- func (this *Controller) Authentication(req *http.Request, session sessions.Session) (int, []byte)
- func (this *Controller) AuthenticationCreate(req *http.Request) (int, []byte)
- func (this *Controller) AuthenticationDelete(req *http.Request, session sessions.Session) (int, []byte)
- func (this *Controller) CreateEmailAuthentication(req *http.Request, session sessions.Session) (int, []byte)
- func (this *Controller) Current(session sessions.Session) (int, []byte)
- func (this *Controller) Get(param martini.Params) (int, []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticationInfo ¶
用户注册&登陆 统一返回的信息格式(敏感信息)
func CreateSign ¶
生成签名 @return sign @return expire
Types ¶
type Controller ¶
type Controller struct { as.Controller // contains filtered or unexported fields }
func New ¶
func New() *Controller
func (*Controller) Authentication ¶
登陆(获取授权令牌) @router /users/authentication [get]
func (*Controller) AuthenticationCreate ¶
func (this *Controller) AuthenticationCreate(req *http.Request) (int, []byte)
预注册(创建授权令牌) 并不会注册用户,只会发邮件 @router /users/authentication (captcha) [post]
func (*Controller) AuthenticationDelete ¶
func (this *Controller) AuthenticationDelete(req *http.Request, session sessions.Session) (int, []byte)
删除登陆令牌(登出) 并不会删除用户表信息 @router /users/authentication [delete]
func (*Controller) CreateEmailAuthentication ¶
func (this *Controller) CreateEmailAuthentication(req *http.Request, session sessions.Session) (int, []byte)
真正注册 验证邮箱令牌,并注册用户 @router /users/authentication/email [post]
Click to show internal directories.
Click to hide internal directories.