Skip to content

Commit

Permalink
expose a function to check a supported algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
dhontecillas committed May 6, 2024
1 parent faa2081 commit 71de8c7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jose.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,11 @@ var supportedAlgorithms = map[string]jose.SignatureAlgorithm{
"PS512": jose.PS512,
}

func SupportedAlgorithm(s string) (jose.SignatureAlgorithm, bool) {
a, ok := supportedAlgorithms[s]
return a, ok
}

func convertToStringSlice(input []interface{}) []string {
result := make([]string, len(input))

Expand Down

0 comments on commit 71de8c7

Please sign in to comment.