Documentation
¶
Index ¶
Constants ¶
View Source
const HMAC_SAMPLE_SECRET = "hmacSampleSecret"
View Source
const TOKEN_DURATION = time.Hour
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claims ¶
type Claims struct { CustomerId string `json:"customer_id"` Accounts []string `json:"accounts"` Username string `json:"username"` Expiry int64 `json:"exp"` Role string `json:"role"` }
func (Claims) IsUserRole ¶
type Login ¶
type Login struct { Username string `db:"username"` CustomerId sql.NullString `db:"customer_id"` Role string `db:"role"` Accounts sql.NullString `db:"account_numbers"` }
func (Login) GenerateToken ¶
Click to show internal directories.
Click to hide internal directories.