Documentation
¶
Index ¶
- func GetLoginFromRefreshToken(token string) string
- func Init(app *fiber.App, cfg services.Configer, handlers ...fiber.Handler)
- type AccessTokenConfig
- type Config
- func (c Config) GetAccessToken() services.AccessTokenConfiger
- func (c Config) GetFactors() services.FactorsConfiger
- func (c Config) GetRefreshToken() services.RefreshTokenConfiger
- func (c Config) GetRegister() services.RegisterConfiger
- func (c Config) GetWithCookie() bool
- func (c Config) GetWithLogout() bool
- func (c Config) GetWithSignUp() bool
- func (c Config) Init() services.Configer
- type FactorsConfig
- func (f FactorsConfig) GetDuration() time.Duration
- func (f FactorsConfig) GetIsEnabled() bool
- func (f FactorsConfig) GetRepository() services.FactorsRepository
- func (f FactorsConfig) GetSMS() internalService.SMSConfiger
- func (f FactorsConfig) GetSecretKey() []byte
- func (f FactorsConfig) GetTOTP() internalService.TOTPConfiger
- func (f FactorsConfig) Init() internalService.FactorsConfiger
- type RefreshTokenConfig
- type RegisterConfig
- type SMSConfig
- type TOTPConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccessTokenConfig ¶
type AccessTokenConfig struct {
SecretKey []byte
Duration time.Duration
Repository services.AccessTokenRepository
}
func (AccessTokenConfig) GetDuration ¶
func (a AccessTokenConfig) GetDuration() time.Duration
func (AccessTokenConfig) GetRepository ¶
func (a AccessTokenConfig) GetRepository() services.AccessTokenRepository
func (AccessTokenConfig) GetSecretKey ¶
func (a AccessTokenConfig) GetSecretKey() []byte
type Config ¶
type Config struct {
AccessToken services.AccessTokenConfiger
RefreshToken services.RefreshTokenConfiger
Register services.RegisterConfiger
Factors services.FactorsConfiger
WithCookie bool
WithSignUp bool
WithLogout bool
}
func (Config) GetAccessToken ¶
func (c Config) GetAccessToken() services.AccessTokenConfiger
func (Config) GetFactors ¶
func (c Config) GetFactors() services.FactorsConfiger
func (Config) GetRefreshToken ¶
func (c Config) GetRefreshToken() services.RefreshTokenConfiger
func (Config) GetRegister ¶
func (c Config) GetRegister() services.RegisterConfiger
func (Config) GetWithCookie ¶
func (Config) GetWithLogout ¶
func (Config) GetWithSignUp ¶
type FactorsConfig ¶
type FactorsConfig struct {
IsEnabled bool
SecretKey []byte
Duration time.Duration
Repository services.FactorsRepository
TOTP internalService.TOTPConfiger
SMS internalService.SMSConfiger
}
func (FactorsConfig) GetDuration ¶
func (f FactorsConfig) GetDuration() time.Duration
func (FactorsConfig) GetIsEnabled ¶
func (f FactorsConfig) GetIsEnabled() bool
func (FactorsConfig) GetRepository ¶
func (f FactorsConfig) GetRepository() services.FactorsRepository
func (FactorsConfig) GetSMS ¶
func (f FactorsConfig) GetSMS() internalService.SMSConfiger
func (FactorsConfig) GetSecretKey ¶
func (f FactorsConfig) GetSecretKey() []byte
func (FactorsConfig) GetTOTP ¶
func (f FactorsConfig) GetTOTP() internalService.TOTPConfiger
func (FactorsConfig) Init ¶
func (f FactorsConfig) Init() internalService.FactorsConfiger
type RefreshTokenConfig ¶
type RefreshTokenConfig struct {
IsEnabled bool
Duration time.Duration
Repository services.RefreshTokenRepository
}
func (RefreshTokenConfig) GetDuration ¶
func (r RefreshTokenConfig) GetDuration() time.Duration
func (RefreshTokenConfig) GetIsEnabled ¶
func (r RefreshTokenConfig) GetIsEnabled() bool
func (RefreshTokenConfig) GetRepository ¶
func (r RefreshTokenConfig) GetRepository() services.RefreshTokenRepository
type RegisterConfig ¶
type RegisterConfig struct {
IsEnabled bool
Repository services.RegisterRepository
}
func (RegisterConfig) GetIsEnabled ¶
func (r RegisterConfig) GetIsEnabled() bool
func (RegisterConfig) GetRepository ¶
func (r RegisterConfig) GetRepository() services.RegisterRepository
type SMSConfig ¶
type SMSConfig struct {
IsEnabled bool
Repository services.SMSRepository
}
func (SMSConfig) GetIsEnabled ¶
func (SMSConfig) GetRepository ¶
func (s SMSConfig) GetRepository() services.SMSRepository
type TOTPConfig ¶
type TOTPConfig struct {
IsEnabled bool
Issuer string
Repository services.TOTPRepository
}
func (TOTPConfig) GetIsEnabled ¶
func (t TOTPConfig) GetIsEnabled() bool
func (TOTPConfig) GetIssuer ¶
func (t TOTPConfig) GetIssuer() string
func (TOTPConfig) GetRepository ¶
func (t TOTPConfig) GetRepository() services.TOTPRepository
Source Files
¶
Click to show internal directories.
Click to hide internal directories.