NewClaims returns the default claims with the given options added.
(opts ...Options)
| 105 | |
| 106 | // NewClaims returns the default claims with the given options added. |
| 107 | func NewClaims(opts ...Options) (*Claims, error) { |
| 108 | c := DefaultClaims() |
| 109 | for _, fn := range opts { |
| 110 | if err := fn(c); err != nil { |
| 111 | return nil, err |
| 112 | } |
| 113 | } |
| 114 | return c, nil |
| 115 | } |
| 116 | |
| 117 | // DefaultClaims returns the default claims of any token. |
| 118 | func DefaultClaims() *Claims { |
searching dependent graphs…