Help us shape the future of Go! Take the 2026 Go Developer Survey

claims

package
v0.58.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package claims provides strict decoders for OAuth protocol claim values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeStringArray

func DecodeStringArray(raw any) ([]string, error)

DecodeStringArray decodes a claim containing []string or []any whose elements are all strings. Nil values (including typed nil slices such as []string(nil) or []any(nil)), other types, and non-string elements return an error. A non-nil empty array returns (nil, nil). The result does not alias the input.

Typed nil slices are rejected rather than treated as empty arrays so a security-relevant caller can rely on a consistent nil-is-error contract: an absent or malformed claim must never be silently equivalent to a legitimate empty-array claim.

Types

This section is empty.

Jump to

Keyboard shortcuts

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