Documentation ¶
Index ¶
Constants ¶
View Source
const ( RoleAdmin = "ADMIN" RoleSeller = "SELLER" RoleCustomer = "CUSTOMER" )
These are the expected values for Claims.Roles.
View Source
const Key ctxKey = 1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func (*Auth) GenerateToken ¶
type Claims ¶
type Claims struct { jwt.StandardClaims Roles []string `json:"roles"` }
func (Claims) Authorized ¶
type Keys ¶
type Keys map[string]*rsa.PrivateKey
Click to show internal directories.
Click to hide internal directories.