jwtclaims

package
v2.10.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBoolClaim

func GetBoolClaim(m map[string]any, key string) bool

GetBoolClaim extracts a boolean claim from a map

func GetByPath

func GetByPath(m map[string]any, path string) mo.Option[any]

GetByPath extracts a value from a nested map using a dot-separated path

func GetStringClaim

func GetStringClaim(m map[string]any, key string) string

GetStringClaim extracts a string claim from a map

func GetStringSliceClaim

func GetStringSliceClaim(m map[string]any, key string) []string

GetStringSliceClaim extracts a string slice claim from a map. A single string value is split on commas or spaces (group/role claims are commonly delivered that way).

func ParseJWTClaims

func ParseJWTClaims(idToken string) map[string]any

ParseJWTClaims parses unverified JWT metadata for pre-verification routing.

func StringSliceFromValue added in v2.10.0

func StringSliceFromValue(v any) []string

StringSliceFromValue flattens a claim value into a slice of strings. Accepts string (trimmed, single element), []string, []any (string elements only), or nil. Unlike GetStringSliceClaim it never splits a single string into multiple values, so it is safe for claims whose values may legally contain separators (e.g. aud URIs).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL