jwt

package
v0.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const FakeJWT = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.ufhxDTmrs4T5MSsvT6lsb3OpdWi5q8O31VX7TgrVamA"

Variables

This section is empty.

Functions

This section is empty.

Types

type JWTWriter

type JWTWriter struct {
	// contains filtered or unexported fields
}

func NewJWTWriter

func NewJWTWriter(token string) (*JWTWriter, error)

func NewJWTWriterWithValidClaims added in v0.8.2

func NewJWTWriterWithValidClaims(j *JWTWriter) *JWTWriter

func (*JWTWriter) Clone added in v0.8.2

func (j *JWTWriter) Clone() *JWTWriter

func (*JWTWriter) GetToken added in v0.8.2

func (j *JWTWriter) GetToken() *jwt.Token

func (*JWTWriter) IsHMACAlg added in v0.4.3

func (j *JWTWriter) IsHMACAlg() bool

func (*JWTWriter) SignWithKey

func (j *JWTWriter) SignWithKey(key interface{}) (string, error)

func (*JWTWriter) SignWithMethodAndKey

func (j *JWTWriter) SignWithMethodAndKey(method jwt.SigningMethod, key interface{}) (string, error)

func (*JWTWriter) SignWithMethodAndRandomKey added in v0.4.4

func (j *JWTWriter) SignWithMethodAndRandomKey(method jwt.SigningMethod) (string, error)

func (*JWTWriter) WithAlgNone

func (j *JWTWriter) WithAlgNone() (string, error)

func (*JWTWriter) WithoutSignature

func (j *JWTWriter) WithoutSignature() (string, error)

type OrderedMapClaims added in v0.8.2

type OrderedMapClaims struct {
	jwt.Claims
	Raw string
}

func NewOrderedMapClaims added in v0.8.2

func NewOrderedMapClaims(token *jwt.Token) *OrderedMapClaims

func (OrderedMapClaims) MarshalJSON added in v0.8.2

func (m OrderedMapClaims) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL