Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(name string, authenticator Authenticator)
Register add different authenticators to registry map.
Types ¶
type AuthController ¶
type AuthController struct {
beego.Controller
}
AuthController operations for Auth
func (*AuthController) CurrentUser ¶
func (c *AuthController) CurrentUser()
@router /currentuser [get]
func (*AuthController) Login ¶
func (c *AuthController) Login()
type is login type name when login type is oauth2 used for oauth2 type @router /login/:type/?:name [get,post]
type Authenticator ¶
type Authenticator interface { // Authenticate ... Authenticate(m models.AuthModel) (*models.User, error) }
Authenticator provides interface to authenticate user credentials.
type LoginResult ¶
type LoginResult struct {
Token string `json:"token"`
}
Click to show internal directories.
Click to hide internal directories.