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

Function getBoolClaim

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

Source from the content-addressed store, hash-verified

402}
403
404func getBoolClaim(primary, fallback map[string]interface{}, key string) bool {
405 if v, ok := primary[key]; ok && v != nil {
406 if b, ok := v.(bool); ok {
407 return b
408 }
409 }
410 if v, ok := fallback[key]; ok && v != nil {
411 if b, ok := v.(bool); ok {
412 return b
413 }
414 }
415 return false
416}
417
418// extractGroups extracts group names from claims (groups or ak_groups for Authentik).
419// Supports: array of strings, array of objects with "name" key, or single string.

Callers 1

ExchangeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected