claims

package
v0.0.0-...-c49bbb6 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package claims generates deterministic OIDC profile claims for idemtoken.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeterministicID

func DeterministicID(input, format string) string

DeterministicID returns a subject ID derived deterministically from the input. format selects the style: "base32" for a 16-char lowercase base32 string, anything else (including "petname") for a three-word slug.

func FakeClaims

func FakeClaims(client, sub string, scopes map[string]bool, overrides map[string]any) map[string]any

FakeClaims generates deterministic OIDC profile claims seeded by client+sub. Only claims belonging to the requested scopes are returned. Claims already present in overrides are skipped -- caller wins.

func ParseScopes

func ParseScopes(raw string) map[string]bool

ParseScopes returns a set of requested scopes. "openid" is always included.

func ScopeString

func ScopeString(scopes map[string]bool) string

ScopeString converts the scope set back to a space-separated string for the token claim.

Types

This section is empty.

Jump to

Keyboard shortcuts

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