Documentation
¶
Index ¶
- Variables
- type Service
- func (s *Service) FetchUserInfo(ctx context.Context, provider string, input dto.FetchUserInfoInput) (oauth.UserInfo, error)
- func (s *Service) GetConsentPageUrl(_ context.Context, provider string, redirectUrl string) (dto.GetConsentPageUrlOutput, error)
- func (s *Service) Login(ctx context.Context, input dto.LoginInput) (dto.JwtTokensOutput, error)
- func (s *Service) Logout(ctx context.Context, jti string) error
- func (s *Service) RecoveryPassword(ctx context.Context, input dto.RecoveryPasswordInput, ...) error
- func (s *Service) RefreshTokens(ctx context.Context, refreshToken string) (dto.JwtTokensOutput, error)
- func (s *Service) Register(ctx context.Context, input dto.RegisterInput, localizer *i18n.Localizer) error
- func (s *Service) RegisterConfirm(ctx context.Context, input dto.RegisterConfirmInput) error
- func (s *Service) RegisterOrLogin(ctx context.Context, userInfo oauth.UserInfo) (dto.JwtTokensOutput, error)
- func (s *Service) ResetPassword(ctx context.Context, input dto.ResetPasswordInput) error
- func (s *Service) VerifyRecoveryCode(ctx context.Context, input dto.VerifyRecoveryCodeInput) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDuplicateUser = dto2.NewI18nError("duplicate user", "errors.duplicate_user") ErrInvalidOrExpiredOtp = dto2.NewI18nError("OTP is invalid or has expired", "errors.invalid_or_expired_otp") ErrBadCredentials = dto2.NewI18nError("bad credentials", "errors.bad_credentials") ErrUserIsBlocked = dto2.NewI18nError("user is blocked", "errors.user_is_blocked") ErrUserNotFound = dto2.NewI18nError("user not found", "errors.user_not_found") ErrInvalidJwtToken = dto2.NewI18nError("invalid JWT token", "errors.invalid_jwt_token") ErrUserInfoNotReceived = dto2.NewI18nError("user info not received", "errors.userinfo_not_received") ErrInvalidProvider = dto2.NewI18nError("invalid provider", "errors.invalid_provider") ErrSendEmail = dto2.NewI18nError("failed to send email", "errors.failed_to_send_email") )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) FetchUserInfo ¶
func (*Service) GetConsentPageUrl ¶
func (*Service) Login ¶
func (s *Service) Login(ctx context.Context, input dto.LoginInput) (dto.JwtTokensOutput, error)
func (*Service) RecoveryPassword ¶
func (*Service) RefreshTokens ¶
func (*Service) RegisterConfirm ¶
func (*Service) RegisterOrLogin ¶
func (*Service) ResetPassword ¶
func (*Service) VerifyRecoveryCode ¶
Click to show internal directories.
Click to hide internal directories.