Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/golang-jwt/jwt
/ functions
Functions
181 in github.com/golang-jwt/jwt
⨍
Functions
181
◇
Types & classes
33
Method
MarshalJSON
()
types.go:135
Function
New
New creates a new Token with the specified signing method and an empty map of claims.
token.go:46
Function
Parse
Parse parses, validates, verifies the signature and returns the parsed token. keyFunc will receive the parsed token and should return the cryptographi
token.go:104
Function
ParseECPrivateKeyFromPEM
ParseECPrivateKeyFromPEM parses a PEM encoded Elliptic Curve Private Key Structure
ecdsa_utils.go:16
Function
ParseECPublicKeyFromPEM
ParseECPublicKeyFromPEM parses a PEM encoded PKCS1 or PKCS8 public key
ecdsa_utils.go:43
Function
ParseEdPrivateKeyFromPEM
ParseEdPrivateKeyFromPEM parses a PEM-encoded Edwards curve private key
ed25519_utils.go:17
Function
ParseEdPublicKeyFromPEM
ParseEdPublicKeyFromPEM parses a PEM-encoded Edwards curve public key
ed25519_utils.go:42
Function
ParseRSAPrivateKeyFromPEM
ParseRSAPrivateKeyFromPEM parses a PEM encoded PKCS1 or PKCS8 private key
rsa_utils.go:17
Function
ParseRSAPrivateKeyFromPEMWithPassword
ParseRSAPrivateKeyFromPEMWithPassword parses a PEM encoded PKCS1 or PKCS8 private key protected with password Deprecated: This function is deprecated
rsa_utils.go:47
Function
ParseRSAPublicKeyFromPEM
ParseRSAPublicKeyFromPEM parses a PEM encoded PKCS1 or PKCS8 public key
rsa_utils.go:79
Function
ParseWithClaims
ParseWithClaims is a shortcut for NewParser().ParseWithClaims(). Note: If you provide a custom claim implementation that embeds one of the standard c
token.go:113
Method
Sign
Sign implements token signing for the SigningMethod For this signing method, must be an *rsa.PrivateKey structure.
rsa.go:78
Method
Sign
Sign implements token signing for the SigningMethod. For this signing method, key must be an ecdsa.PrivateKey struct
ecdsa.go:100
Method
Sign
Sign implements token signing for the SigningMethod. For this signing method, key must be an ed25519.PrivateKey
ed25519.go:66
Method
Sign
Sign implements token signing for the SigningMethod. For this signing method, key must be an rsa.PrivateKey struct
rsa_pss.go:119
Method
Sign
Sign implements token signing for the SigningMethod. Key must be []byte
hmac.go:82
Method
Sign
Only allow 'none' signing if UnsafeAllowNoneSignatureType is specified as the key
none.go:47
Function
TestBearerExtractor
(t *testing.T)
request/extractor_test.go:93
Function
TestECDSASign
(t *testing.T)
ecdsa_test.go:78
Function
TestECDSAVerify
(t *testing.T)
ecdsa_test.go:54
Function
TestEd25519Sign
(t *testing.T)
ed25519_test.go:62
Function
TestEd25519Verify
(t *testing.T)
ed25519_test.go:37
Function
TestExtractor
(t *testing.T)
request/extractor_test.go:66
Function
TestHMACSign
(t *testing.T)
hmac_test.go:66
Function
TestHMACVerify
(t *testing.T)
hmac_test.go:51
Function
TestMapClaimsVerifyExpiresAtExpire
(t *testing.T)
map_claims_test.go:102
Function
TestMapclaimsVerifyExpiresAtInvalidTypeString
(t *testing.T)
map_claims_test.go:90
Function
TestMapclaimsVerifyIssuedAtInvalidTypeString
(t *testing.T)
map_claims_test.go:68
Function
TestMapclaimsVerifyNotBeforeInvalidTypeString
(t *testing.T)
map_claims_test.go:79
Function
TestNoneSign
(t *testing.T)
none_test.go:59
Function
TestNoneVerify
(t *testing.T)
none_test.go:44
Function
TestNumericDate
(t *testing.T)
types_test.go:12
Function
TestNumericDate_MarshalJSON
(t *testing.T)
types_test.go:68
Function
TestParseRequest
(t *testing.T)
request/request_test.go:57
Function
TestParser_Parse
(t *testing.T)
parser_test.go:340
Function
TestParser_ParseUnverified
(t *testing.T)
parser_test.go:431
Function
TestRSAKeyParsing
(t *testing.T)
rsa_test.go:111
Function
TestRSAPSSSaltLengthCompatibility
(t *testing.T)
rsa_pss_test.go:101
Function
TestRSAPSSSign
(t *testing.T)
rsa_pss_test.go:77
Function
TestRSAPSSVerify
(t *testing.T)
rsa_pss_test.go:54
Function
TestRSASign
(t *testing.T)
rsa_test.go:61
Function
TestRSAVerify
(t *testing.T)
rsa_test.go:43
Function
TestRSAVerifyWithPreParsedPrivateKey
(t *testing.T)
rsa_test.go:80
Function
TestRSAWithPreParsedPrivateKey
(t *testing.T)
rsa_test.go:94
Function
TestSetPadding
Extension of Parsing, this is to test out functionality specific to switching codecs with padding.
parser_test.go:644
Function
TestSingleArrayMarshal
(t *testing.T)
types_test.go:37
Function
TestToken_SigningString
(t1 *testing.T)
token_test.go:9
Function
TestVerifyAud
(t *testing.T)
map_claims_test.go:8
Method
UnmarshalJSON
UnmarshalJSON is an implementation of the json.RawMessage interface and deserializses a NumericDate from a JSON representation, i.e. a json.Number. Th
types.go:78
Method
UnmarshalJSON
(data []byte)
types.go:102
Method
Valid
Valid validates time based claims "exp, iat, nbf". There is no accounting for clock skew. As well, if any of the above claims are not in the token, it
map_claims.go:124
Method
Valid
Valid validates time based claims "exp, iat, nbf". There is no accounting for clock skew. As well, if any of the above claims are not in the token, it
claims.go:51
Method
Valid
Valid validates time based claims "exp, iat, nbf". There is no accounting for clock skew. As well, if any of the above claims are not in the token, it
claims.go:144
Method
Verify
Verify implements token verification for the SigningMethod For this signing method, must be an *rsa.PublicKey structure.
rsa.go:49
Method
Verify
Verify implements token verification for the SigningMethod. For this verify method, key must be an ecdsa.PublicKey struct
ecdsa.go:58
Method
Verify
Verify implements token verification for the SigningMethod. For this verify method, key must be an ed25519.PublicKey
ed25519.go:37
Method
Verify
Verify implements token verification for the SigningMethod. For this verify method, key must be an rsa.PublicKey struct
rsa_pss.go:85
Method
Verify
Verify implements token verification for the SigningMethod. Returns nil if the signature is valid.
hmac.go:49
Method
Verify
Only allow 'none' alg type if UnsafeAllowNoneSignatureType is specified as the key
none.go:28
Method
VerifyAudience
VerifyAudience compares the aud claim against cmp. If required is false, this method will return true if the value matches or is unset
claims.go:82
Method
VerifyAudience
VerifyAudience compares the aud claim against cmp. If required is false, this method will return true if the value matches or is unset
claims.go:175
Method
VerifyIssuer
VerifyIssuer compares the iss claim against cmp. If required is false, this method will return true if the value matches or is unset
map_claims.go:115
Method
VerifyIssuer
VerifyIssuer compares the iss claim against cmp. If required is false, this method will return true if the value matches or is unset
claims.go:118
Method
VerifyIssuer
VerifyIssuer compares the iss claim against cmp. If required is false, this method will return true if the value matches or is unset
claims.go:214
Function
WithJSONNumber
WithJSONNumber is an option to configure the underlying JSON parser with UseNumber
parser_option.go:17
Function
WithParser
WithParser parses using a custom parser
request/request.go:66
Function
WithValidMethods
WithValidMethods is an option to supply algorithm methods that the parser will check. Only those methods will be considered valid. It is heavily encou
parser_option.go:10
Function
WithoutClaimsValidation
WithoutClaimsValidation is an option to disable claims validation. This option should only be used if you exactly know what you are doing.
parser_option.go:25
Function
authHandler
reads the form values, checks them and creates the token
http_example_test.go:159
Function
init
()
rsa.go:23
Function
init
read the key files before starting http handlers
http_example_test.go:36
Function
init
()
ecdsa.go:32
Function
init
()
hmac_example_test.go:16
Function
init
()
parser_test.go:33
Function
init
()
ed25519.go:24
Function
init
()
rsa_pss.go:30
Function
init
()
hmac.go:24
Function
init
()
none.go:14
Function
main
()
cmd/jwt/main.go:38
Function
restrictedHandler
only accessible with a valid token
http_example_test.go:193
Function
stripBearerPrefixFromTokenString
Strips 'Bearer ' prefix from bearer token string
request/oauth2.go:8
← previous
101–181 of 181, ranked by callers