Documentation ¶
Index ¶
- Constants
- Variables
- type AuthSms
- func (a *AuthSms) Config() interface{}
- func (a *AuthSms) ErrorDescriptions() map[string]string
- func (a *AuthSms) ErrorProtocolCodes() map[string]int
- func (a *AuthSms) Handle(ctx auth.AuthContext) (bool, error)
- func (a *AuthSms) Init(cfg config.Config, log logger.Logger, vld validator.Validator, ...) error
- func (a *AuthSms) SetAuthManager(manager auth.AuthManager)
- func (a *AuthSms) SetSmsManager(smsManager sms.SmsManager)
- type AuthSmsConfig
- type SmsCacheToken
- type SmsDelay
- type SmsToken
- type UserWithPhone
Constants ¶
View Source
const CodeName = "sms-code"
View Source
const DelayName = "sms-delay"
View Source
const ErrorCodeContentMismatch = "sms_content_mismatch"
View Source
const ErrorCodeInvalidPhone = "sms_invalid_phone"
View Source
const ErrorCodeInvalidSmsCode = "sms_code_invalid"
View Source
const ErrorCodeInvalidToken = "sms_token_invalid"
View Source
const ErrorCodeSmsConfirmationRequired = "sms_confirmation_required"
View Source
const ErrorCodeSmsTokenRequired = "sms_token_required"
View Source
const ErrorCodeTokenExpired = "sms_token_expired"
View Source
const ErrorCodeTooManyTries = "sms_too_many_tries"
View Source
const ErrorCodeWaitDelay = "sms_wait_delay"
View Source
const PhoneName = "sms-phone"
View Source
const SmsDelayCacheKey = "sms-delay"
View Source
const SmsProtocol = "sms"
View Source
const SmsTokenCacheKey = "sms-token"
View Source
const TokenName = "sms-token"
Variables ¶
View Source
var LastSmsCode = ""
Functions ¶
This section is empty.
Types ¶
type AuthSms ¶
type AuthSms struct { auth.AuthHandlerBase AuthSmsConfig Encryption auth.AuthParameterEncryption // contains filtered or unexported fields }
func New ¶
func New(smsManager sms.SmsManager) *AuthSms
func (*AuthSms) ErrorDescriptions ¶
func (*AuthSms) ErrorProtocolCodes ¶
func (*AuthSms) SetAuthManager ¶
func (a *AuthSms) SetAuthManager(manager auth.AuthManager)
func (*AuthSms) SetSmsManager ¶
func (a *AuthSms) SetSmsManager(smsManager sms.SmsManager)
type AuthSmsConfig ¶
type SmsCacheToken ¶
type SmsDelay ¶
type SmsDelay struct {
common.CreatedAtBase
}
type UserWithPhone ¶
type UserWithPhone interface {
Phone() string
}
Click to show internal directories.
Click to hide internal directories.