Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/golang-jwt/jwt
/ types & classes
Types & classes
33 in github.com/golang-jwt/jwt
⨍
Functions
181
◇
Types & classes
33
↓ 1 callers
TypeAlias
ClaimStrings
ClaimStrings is basically just a slice of strings, but it can be either serialized from a string array or just a string. This type is necessary, since
types.go:100
TypeAlias
ArgList
cmd/jwt/main.go:330
TypeAlias
ArgumentExtractor
ArgumentExtractor extracts a token from request arguments. This includes a POSTed form or GET URL arguments. Argument names are tried in order until
request/extractor.go:38
Struct
BearerExtractor
BearerExtractor extracts a token from the Authorization header. The header is expected to match the format "Bearer XX", where "XX" is the JWT token.
request/extractor.go:87
Interface
Claims
Claims must just have a Valid method that determines if the token is invalid for any supported reason
claims.go:11
Struct
CustomClaimsExample
http_example_test.go:75
Struct
CustomerInfo
Define some custom types were going to use within our tokens
http_example_test.go:70
Interface
Extractor
Extractor is an interface for extracting a token from an HTTP request. The ExtractToken method should return a token string or an error. If no token i
request/extractor.go:17
TypeAlias
HeaderExtractor
HeaderExtractor is an extractor for finding a token in a header. Looks at each specified header in order until there's a match
request/extractor.go:23
FuncType
Keyfunc
Keyfunc will be used by the Parse methods as a callback function to supply the key for verification. The function receives the parsed, but unverified
token.go:32
TypeAlias
MapClaims
MapClaims is a claims type that uses the map[string]interface{} for JSON decoding. This is the default claims type if you don't supply one
map_claims.go:12
TypeAlias
MultiExtractor
MultiExtractor tries Extractors in order until one returns a token string or an error occurs
request/extractor.go:55
Struct
MyCustomClaims
example_test.go:36
Struct
NumericDate
NumericDate represents a JSON numeric date value, as referenced at https://datatracker.ietf.org/doc/html/rfc7519#section-2.
types.go:32
FuncType
ParseFromRequestOption
func(*fromRequestParser)
request/request.go:56
Struct
Parser
parser.go:10
FuncType
ParserOption
ParserOption is used to implement functional-style options that modify the behavior of the parser. To add new options, just create a function (ideally
parser_option.go:6
Struct
PostExtractionFilter
PostExtractionFilter wraps an Extractor in this to post-process the value before it's handed off. See AuthorizationHeaderExtractor for an example
request/extractor.go:71
Struct
RegisteredClaims
RegisteredClaims are a structured version of the JWT Claims Set, restricted to Registered Claim Names, as referenced at https://datatracker.ietf.org/d
claims.go:24
Interface
SigningMethod
SigningMethod can be used add new methods for signing or verifying tokens.
signing_method.go:11
Struct
SigningMethodECDSA
SigningMethodECDSA implements the ECDSA family of signing methods. Expects *ecdsa.PrivateKey for signing and *ecdsa.PublicKey for verification
ecdsa.go:18
Struct
SigningMethodEd25519
SigningMethodEd25519 implements the EdDSA family. Expects ed25519.PrivateKey for signing and ed25519.PublicKey for verification
ed25519.go:17
Struct
SigningMethodHMAC
SigningMethodHMAC implements the HMAC-SHA family of signing methods. Expects key type of []byte for both signing and validation
hmac.go:11
Struct
SigningMethodRSA
SigningMethodRSA implements the RSA family of signing methods. Expects *rsa.PrivateKey for signing and *rsa.PublicKey for validation
rsa.go:11
Struct
SigningMethodRSAPSS
SigningMethodRSAPSS implements the RSAPSS family of signing methods signing methods
rsa_pss.go:13
Struct
StandardClaims
StandardClaims are a structured version of the JWT Claims Set, as referenced at https://datatracker.ietf.org/doc/html/rfc7519#section-4. They do not f
claims.go:131
Struct
Token
Token represents a JWT Token. Different fields will be used depending on whether you're creating or parsing/verifying a token.
token.go:36
Struct
ValidationError
ValidationError represents an error from Parse if token is not valid
errors.go:51
Struct
fields
token_test.go:10
Struct
fromRequestParser
request/request.go:49
Struct
signingMethodNone
none.go:11
Struct
test
map_claims_test.go:12
TypeAlias
unsafeNoneMagicConstant
none.go:12