Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RoleAdmin = Role{"ADMIN"} RoleUser = Role{"USER"} )
Functions ¶
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
Auth is to used for authenticate clients
type Claims ¶
type Claims struct { jwt.RegisteredClaims `json:"registered"` Roles []Role `json:"roles"` }
func (Claims) Authorized ¶
type KeyLookup ¶
type KeyLookup interface { PrivateKey(kid string) (*rsa.PrivateKey, error) PublicKey(kid string) (*rsa.PublicKey, error) }
private and public keys for JWT use
type Role ¶
type Role struct {
// contains filtered or unexported fields
}
func MustParseRole ¶
func (*Role) MarshalText ¶
func (*Role) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.