Documentation ¶
Index ¶
- type Claims
- func (c *Claims) GenerateID() *Claims
- func (c *Claims) WithAudience(aud ...string) *Claims
- func (c *Claims) WithExpiry(exp time.Time) *Claims
- func (c *Claims) WithExpiryInFuture(seconds int64) *Claims
- func (c *Claims) WithIssuedAt(iat time.Time) *Claims
- func (c *Claims) WithIssuedAtNow() *Claims
- func (c *Claims) WithIssuer(iss string) *Claims
- func (c *Claims) WithNotBefore(nbf time.Time) *Claims
- func (c *Claims) WithSubject(sub string) *Claims
- type Flatten
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claims ¶
Claims is an alias of jwt.Claims.
func (*Claims) GenerateID ¶
func (*Claims) WithAudience ¶
func (*Claims) WithExpiryInFuture ¶
func (*Claims) WithIssuedAtNow ¶
func (*Claims) WithIssuer ¶
func (*Claims) WithSubject ¶
type Flatten ¶
type Flatten interface {
// Flatten returns a list of objects, which will be supplied to JWT builder in sequence.
Flatten() []interface{}
}
Flatten is a voluntary interface to implement, so that the claim object can be flattened and supplied to JWT builder in pieces. This is useful when the custom JWT claim object has a hierarchical structure, but wishes to be encoded as a flat JWT claim.
Click to show internal directories.
Click to hide internal directories.