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

Function RegisterSigningMethod

signing_method.go:22–27  ·  signing_method.go::RegisterSigningMethod

RegisterSigningMethod registers the "alg" name and a factory function for signing method. This is typically done during init() in the method's implementation

(alg string, f func() SigningMethod)

Source from the content-addressed store, hash-verified

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
22func RegisterSigningMethod(alg string, f func() SigningMethod) {
23 signingMethodLock.Lock()
24 defer signingMethodLock.Unlock()
25
26 signingMethods[alg] = f
27}
28
29// GetSigningMethod retrieves a signing method from an "alg" string
30func GetSigningMethod(alg string) (method SigningMethod) {

Callers 6

initFunction · 0.85
initFunction · 0.85
initFunction · 0.85
initFunction · 0.85
initFunction · 0.85
initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected