Documentation ¶
Index ¶
- Variables
- type OAuthParser
- type OAuthScheme
- func (s *OAuthScheme) AppLogin(appName string) (auth.Token, error)
- func (s *OAuthScheme) AppLogout(token string) error
- func (s *OAuthScheme) Auth(header string) (auth.Token, error)
- func (s *OAuthScheme) Create(user *auth.User) (*auth.User, error)
- func (s *OAuthScheme) Info() (auth.SchemeInfo, error)
- func (s *OAuthScheme) Login(params map[string]string) (auth.Token, error)
- func (s *OAuthScheme) Logout(token string) error
- func (s *OAuthScheme) Name() string
- func (s *OAuthScheme) Parse(infoResponse *http.Response) (string, error)
- func (s *OAuthScheme) Remove(u *auth.User) error
- type Token
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingCodeError = &errors.ValidationError{Message: "You must provide code to login"} ErrMissingCodeRedirectUrl = &errors.ValidationError{Message: "You must provide the used redirect url to login"} ErrEmptyAccessToken = &errors.NotAuthorizedError{Message: "Couldn't convert code to access token."} ErrEmptyUserEmail = &errors.NotAuthorizedError{Message: "Couldn't parse user email."} )
Functions ¶
This section is empty.
Types ¶
type OAuthParser ¶
type OAuthScheme ¶
type OAuthScheme struct { BaseConfig oauth2.Config InfoUrl string CallbackPort int Parser OAuthParser }
func (*OAuthScheme) AppLogout ¶
func (s *OAuthScheme) AppLogout(token string) error
func (*OAuthScheme) Info ¶
func (s *OAuthScheme) Info() (auth.SchemeInfo, error)
func (*OAuthScheme) Logout ¶
func (s *OAuthScheme) Logout(token string) error
func (*OAuthScheme) Name ¶
func (s *OAuthScheme) Name() string
type Token ¶
func (*Token) GetAppName ¶
func (*Token) GetUserName ¶
func (*Token) IsAppToken ¶
func (*Token) Permissions ¶
func (t *Token) Permissions() ([]permission.Permission, error)
Click to show internal directories.
Click to hide internal directories.