Versions in this module Expand all Collapse all v0 v0.1.1 Aug 10, 2019 v0.1.0 Aug 4, 2019 Changes in this version + var ErrCredentialEmailEmpty = errors.New("Credential email cannot be empty") + var ErrCredentialEmailMalformed = errors.New("Credential email is not a valid email address") + var ErrCredentialPassNotMatch = errors.New("Credential password does not match") + var ErrCredentialProviderEmpty = errors.New("Credential provider cannot be empty") + type AccessToken struct + CSRFToken string + Expiry time.Time + Token string + type AuthClaims struct + CSRFToken string + CustomClaims map[string]interface{} + type Credential struct + Claims map[string]interface{} + Email string + ID string + Password string + Provider string + func (cred *Credential) Create(email, pass, provider string) *Credential + func (cred *Credential) FromJWT(tokenString string) (AuthClaims, error) + func (cred *Credential) GenerateJWT() (AccessToken, RefreshToken, error) + func (cred *Credential) Validate() error + func (cred *Credential) VerifyPassword(plainPass string) error + type RefreshToken struct + Expiry time.Time + ID string + Token string