Documentation ¶
Index ¶
- Constants
- type AuthClaim
- type JWTConfig
- type JWTIssuer
- type Jwter
- type RawJWT
- func (r *RawJWT) Address() (res string, ok bool)
- func (r *RawJWT) IsAdmin() (res bool, ok bool)
- func (r *RawJWT) SetAddress(sub string) *RawJWT
- func (r *RawJWT) SetExpirationTimestamp(expiration time.Time) *RawJWT
- func (r *RawJWT) SetIsAdmin(isAdmin bool) *RawJWT
- func (r *RawJWT) SetTokenType(typ TokenType) *RawJWT
- func (r *RawJWT) TokenType() (typ TokenType, ok bool)
- type TokenType
Constants ¶
View Source
const ( AuthorizationHeaderName = "Authorization" BearerTokenPrefix = "Bearer " )
View Source
const ( ClaimAddress = "sub" ClaimTokenType = "type" ClaimExpirationTimestamp = "exp" ClaimIsAdmin = "is_admin" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JWTIssuer ¶
type JWTIssuer struct {
// contains filtered or unexported fields
}
type RawJWT ¶
type RawJWT struct {
// contains filtered or unexported fields
}
RawJWT represents helper structure to provide setter and getter methods to work with JWT claims
func (*RawJWT) SetAddress ¶
func (*RawJWT) SetExpirationTimestamp ¶
func (*RawJWT) SetIsAdmin ¶
func (*RawJWT) SetTokenType ¶
Click to show internal directories.
Click to hide internal directories.