MCPcopy Create free account
hub / github.com/PatchMon/PatchMon / getStringClaim

Function getStringClaim

server-source-code/internal/auth/oidc/client.go:390–402  ·  view source on GitHub ↗
(primary, fallback map[string]interface{}, key string)

Source from the content-addressed store, hash-verified

388}
389
390func getStringClaim(primary, fallback map[string]interface{}, key string) string {
391 if v, ok := primary[key]; ok && v != nil {
392 if s, ok := v.(string); ok {
393 return s
394 }
395 }
396 if v, ok := fallback[key]; ok && v != nil {
397 if s, ok := v.(string); ok {
398 return s
399 }
400 }
401 return ""
402}
403
404func getBoolClaim(primary, fallback map[string]interface{}, key string) bool {
405 if v, ok := primary[key]; ok && v != nil {

Callers 1

ExchangeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected