Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessTokenRepository ¶
type AccessTokenRepository interface { // IsValidCredentials lets know if given credentials are valid IsValidCredentials(ctx context.Context, login, password string) bool // GetClaims return data how must be store in JWT token GetClaims(ctx context.Context, login string) jwt.MapClaims // IsValidAccessToken is an optional function that allows you // to add additional check for validate access token IsValidAccessToken(ctx context.Context, token string) bool // ManageAccessToken is an optional function that allows you // to perform actions after generating an access token (like store it) ManageAccessToken(ctx context.Context, token string, exp *time.Time) // SetCookie is an optional function that allows you to set cookie if // you enabled cookie SetCookie(ctx context.Context, name, value string, exp *time.Time) fiber.Cookie }
type FactorsRepository ¶
type FactorsRepository interface { // IsEnabled check if a 2FA is enabled on this login IsEnabled(ctx context.Context, login string) bool // GetAvailableFactors return a list of active 2FA GetAvailableFactors(ctx context.Context, login string) []string // GetDefaultFactor return default factor for given login GetDefaultFactor(ctx context.Context, login string) string }
type RefreshTokenRepository ¶
type RefreshTokenRepository interface { // IsValidRefreshToken lets know if refresh token is valid IsValidRefreshToken(ctx context.Context, token string) bool // DeleteRefreshToken allows to delete refresh token DeleteRefreshToken(ctx context.Context, token string) // ManageRefreshToken allows you to perform actions after // generating a refresh token (like store it) ManageRefreshToken(ctx context.Context, token string, exp *time.Time) }
type RegisterRepository ¶
type SMSRepository ¶
type SMSRepository interface { }
type TOTPRepository ¶
type TOTPRepository interface { // IsEnabled check if TOTP is already enabled on this login IsEnabled(ctx context.Context, login string) bool GetSharedSecretKey(ctx context.Context, login string) string // Enable allows to enable TOTP Enable(ctx context.Context, key string) // Disable allows to disable TOTP Disable(ctx context.Context, login string) // StoreRecoveryCodes stores a list of recovery codes, // which can be used to recover access to the account // in case of loss or damage to the primary authentication mechanism. StoreRecoveryCodes(ctx context.Context, codes []string) }
Click to show internal directories.
Click to hide internal directories.