MCPcopy
hub / github.com/golang-jwt/jwt / SigningMethod

Interface SigningMethod

signing_method.go:14–18  ·  signing_method.go::SigningMethod

SigningMethod can be used add new methods for signing or verifying tokens. It takes a decoded signature as an input in the Verify function and produces a signature in Sign. The signature is then usually base64 encoded as part of a JWT.

Source from the content-addressed store, hash-verified

12// signature in Sign. The signature is then usually base64 encoded as part of a
13// JWT.
14type SigningMethod interface {
15 Verify(signingString string, sig []byte, key any) error // Returns nil if signature is valid
16 Sign(signingString string, key any) ([]byte, error) // Returns signature or error
17 Alg() string // returns the alg identifier for this method (example: 'HS256')
18}
19
20// RegisterSigningMethod registers the "alg" name and a factory function for signing method.
21// This is typically done during init() in the method's implementation

Callers 24

VerifyMethod · 0.65
TestHMACVerifyFunction · 0.65
ParseWithClaimsMethod · 0.65
TestRSAPSSVerifyFunction · 0.65
verifyFunction · 0.65
VerifyMethod · 0.65
TestEd25519VerifyFunction · 0.65
TestECDSAVerifyFunction · 0.65
SignMethod · 0.65
TestHMACSignFunction · 0.65
TestRSAPSSSignFunction · 0.65
SignMethod · 0.65

Calls

no outgoing calls

Tested by

no test coverage detected