Documentation ¶
Index ¶
- Constants
- type AuthClaim
- type JWTConfig
- type JWTIssuer
- type Jwter
- type RawJWT
- func (r *RawJWT) IsAdmin() (res bool, ok bool)
- func (r *RawJWT) IsVerified() (res bool, ok bool)
- func (r *RawJWT) Nullifier() (res string, ok bool)
- func (r *RawJWT) SetExpirationTimestamp(expiration time.Time) *RawJWT
- func (r *RawJWT) SetIsAdmin(isAdmin bool) *RawJWT
- func (r *RawJWT) SetIsVerified(isVerified bool) *RawJWT
- func (r *RawJWT) SetNullifier(nullifier string) *RawJWT
- func (r *RawJWT) SetSharedHash(sharedHash *string) *RawJWT
- func (r *RawJWT) SetTokenAccess() *RawJWT
- func (r *RawJWT) SetTokenRefresh() *RawJWT
- func (r *RawJWT) SharedHash() (res *string, ok bool)
- func (r *RawJWT) TokenType() (typ TokenType, ok bool)
- type TokenType
Constants ¶
View Source
const ( AuthorizationHeaderName = "Authorization" BearerTokenPrefix = "Bearer " )
View Source
const ( NullifierClaimName = "sub" ExpirationTimestampClaimName = "exp" TokenTypeClaimName = "type" IsVerifiedClaimName = "verified" IsAdminClaimName = "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) IsVerified ¶
func (*RawJWT) SetExpirationTimestamp ¶
func (*RawJWT) SetIsAdmin ¶ added in v0.2.0
func (*RawJWT) SetIsVerified ¶
func (*RawJWT) SetNullifier ¶
func (*RawJWT) SetSharedHash ¶ added in v1.1.0
func (*RawJWT) SetTokenAccess ¶
func (*RawJWT) SetTokenRefresh ¶
func (*RawJWT) SharedHash ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.