Documentation
¶
Index ¶
- Constants
- Variables
- type InputAuthorizeByCode
- type InputAuthorizeBySession
- type InputAuthorizeParams
- type InputForgotPassword
- type InputResetPassword
- type InputTokenByCode
- type InputTokenByRefresh
- type OAuth
- func (s *OAuth) AuthorizeByCode(ctx context.Context, inp InputAuthorizeByCode) (*entity.Client, *entity.Token, *url.URL, error)
- func (s *OAuth) AuthorizeBySession(ctx context.Context, inp InputAuthorizeBySession) (*entity.Client, *entity.Token, *url.URL, error)
- func (s *OAuth) AuthorizeCheckParams(ctx context.Context, inp InputAuthorizeParams) (*entity.Client, error)
- func (s *OAuth) ForgotPassword(ctx context.Context, inp InputForgotPassword) error
- func (s *OAuth) ResetPassword(ctx context.Context, inp InputResetPassword) (*url.URL, error)
- func (s *OAuth) TokenByCode(ctx context.Context, inp InputTokenByCode) (*entity.Token, *entity.Token, error)
- func (s *OAuth) TokenByRefresh(ctx context.Context, inp InputTokenByRefresh) (*entity.Token, *entity.Token, error)
- func (s *OAuth) ValidateAccessToken(ctx context.Context, token string) (*token.AccessClaims, error)
- func (s *OAuth) ValidateForgotToken(ctx context.Context, token string) (*entity.Token, *entity.Client, error)
- func (s *OAuth) ValidateRefreshToken(ctx context.Context, token string) (*entity.Token, error)
Constants ¶
View Source
const ( ResponseTypeCode = "code" GrantTypeAuthorizationCode = "authorization_code" GrantTypeRefreshToken = "refresh_token" )
Variables ¶
View Source
var ( ErrForbidden = errors.New("forbidden") ErrClientNotFound = errors.New("client not found") ErrUserNotFound = errors.New("user not found") ErrTokenNotFound = errors.New("token not found") ErrSessionNotFound = errors.New("session not found") ErrInvalidUserPassword = errors.New("invalid user password") ErrInvalidResponseType = errors.New("invalid response type") ErrInvalidRedirectUri = errors.New("invalid redirect uri") )
Functions ¶
This section is empty.
Types ¶
type InputAuthorizeByCode ¶
type InputAuthorizeBySession ¶
type InputAuthorizeParams ¶
type InputForgotPassword ¶
type InputResetPassword ¶
type InputTokenByCode ¶
type InputTokenByRefresh ¶
type OAuth ¶
type OAuth struct {
// contains filtered or unexported fields
}
func NewOAuth ¶
func NewOAuth(repo *repository.Repository, tm repository.Transaction, token *token.Token, mailing *mailing.Mailing) *OAuth
func (*OAuth) AuthorizeByCode ¶
func (*OAuth) AuthorizeBySession ¶
func (*OAuth) AuthorizeCheckParams ¶
func (*OAuth) ForgotPassword ¶
func (s *OAuth) ForgotPassword(ctx context.Context, inp InputForgotPassword) error
func (*OAuth) ResetPassword ¶
func (*OAuth) TokenByCode ¶
func (*OAuth) TokenByRefresh ¶
func (*OAuth) ValidateAccessToken ¶
func (*OAuth) ValidateForgotToken ¶
Click to show internal directories.
Click to hide internal directories.