Documentation
¶
Index ¶
- func NewRandomKey(method string) (string, error)
- func ParseWithClaims(tokenString string, claims jwt.Claims, ...) (*jwt.Token, error)
- type Claims
- type JWTConfig
- type JWTIssuer
- type StandardClaims
- func (c StandardClaims) GetAudience() (jwt.ClaimStrings, error)
- func (c StandardClaims) GetExpirationTime() (*jwt.NumericDate, error)
- func (c StandardClaims) GetIssuedAt() (*jwt.NumericDate, error)
- func (c StandardClaims) GetIssuer() (string, error)
- func (c StandardClaims) GetNotBefore() (*jwt.NumericDate, error)
- func (c StandardClaims) GetSubject() (string, error)
- func (c *StandardClaims) SetIssuer(ctx context.Context, issuer string)
- func (c StandardClaims) Valid() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRandomKey ¶
Types ¶
type JWTConfig ¶
type JWTConfig struct {
PrivateKey any
PublicKey crypto.PublicKey
Algorithm jwt.SigningMethod
Issuer string
}
func NewJWTConfig ¶
func NewJWTConfigBySecret ¶
func NewRandomRSAJWTConfig ¶
func (*JWTConfig) GetPublicKey ¶
func (*JWTConfig) ParseWithClaims ¶
func (*JWTConfig) SignedString ¶
func (*JWTConfig) UnmarshalJSON ¶
type JWTIssuer ¶
type StandardClaims ¶
type StandardClaims jwt.RegisteredClaims
func (StandardClaims) GetAudience ¶ added in v1.5.3
func (c StandardClaims) GetAudience() (jwt.ClaimStrings, error)
func (StandardClaims) GetExpirationTime ¶ added in v1.5.3
func (c StandardClaims) GetExpirationTime() (*jwt.NumericDate, error)
func (StandardClaims) GetIssuedAt ¶ added in v1.5.3
func (c StandardClaims) GetIssuedAt() (*jwt.NumericDate, error)
func (StandardClaims) GetIssuer ¶ added in v1.5.3
func (c StandardClaims) GetIssuer() (string, error)
func (StandardClaims) GetNotBefore ¶ added in v1.5.3
func (c StandardClaims) GetNotBefore() (*jwt.NumericDate, error)
func (StandardClaims) GetSubject ¶ added in v1.5.3
func (c StandardClaims) GetSubject() (string, error)
func (*StandardClaims) SetIssuer ¶
func (c *StandardClaims) SetIssuer(ctx context.Context, issuer string)
func (StandardClaims) Valid ¶
func (c StandardClaims) Valid() error
Click to show internal directories.
Click to hide internal directories.