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

Function GetSigningMethod

signing_method.go:30–38  ·  view source on GitHub ↗

GetSigningMethod retrieves a signing method from an "alg" string

(alg string)

Source from the content-addressed store, hash-verified

28
29// GetSigningMethod retrieves a signing method from an "alg" string
30func GetSigningMethod(alg string) (method SigningMethod) {
31 signingMethodLock.RLock()
32 defer signingMethodLock.RUnlock()
33
34 if methodF, ok := signingMethods[alg]; ok {
35 method = methodF()
36 }
37 return
38}
39
40// GetAlgorithms returns a list of registered "alg" names
41func GetAlgorithms() (algs []string) {

Callers 1

ParseUnverifiedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected