Documentation ¶
Index ¶
- Variables
- func BuildMessage(mail Mail) string
- func ComparePassword(hashedPassword string, password string) bool
- func GenerateVerificationCode() string
- func HashPassword(password string) string
- func RefreshJWT(token string, addTime time.Duration) (string, error)
- func SendMail(to []string, body string, subject string) error
- func SignJWT(c *Claims) string
- type Claims
- func (c *Claims) GetAudience() (jwt.ClaimStrings, error)
- func (c *Claims) GetExpirationTime() (*jwt.NumericDate, error)
- func (c *Claims) GetIssuedAt() (*jwt.NumericDate, error)
- func (c *Claims) GetIssuer() (string, error)
- func (c *Claims) GetNotBefore() (*jwt.NumericDate, error)
- func (c *Claims) GetSubject() (string, error)
- type Mail
Constants ¶
This section is empty.
Variables ¶
View Source
var RUNES = []rune("0123456789")
Functions ¶
func BuildMessage ¶
func ComparePassword ¶
func GenerateVerificationCode ¶
func GenerateVerificationCode() string
func HashPassword ¶
Types ¶
type Claims ¶
type Claims struct { Subject string `json:"sub"` Iat int64 `json:"iat"` Nbf int64 `json:"nbf"` Issuer string `json:"iss"` Audience jwt.ClaimStrings `json:"aud"` Exp int64 `json:"exp"` }
func (*Claims) GetAudience ¶
func (*Claims) GetExpirationTime ¶
func (*Claims) GetIssuedAt ¶
func (*Claims) GetNotBefore ¶
func (*Claims) GetSubject ¶
Click to show internal directories.
Click to hide internal directories.