claims

package
v0.229.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package claims owns a per-process map of custom JWT claims that get merged into every access token minted by the authapi package.

Tests use POST /admin0/claims (and friends) to shape the claim payload at runtime without restarting the service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store holds the active custom claims. Safe for concurrent use.

func NewStore

func NewStore() *Store

NewStore returns an empty Store.

func (*Store) Clear

func (s *Store) Clear()

Clear removes all claims.

func (*Store) Get

func (s *Store) Get() map[string]any

Get returns a snapshot of the current claims.

func (*Store) MergeInto

func (s *Store) MergeInto(dst map[string]any)

MergeInto writes the stored claims into dst. Stored claims overwrite any existing key in dst — letting tests override e.g. gty or azp if they want.

func (*Store) Set

func (s *Store) Set(claims map[string]any)

Set replaces the entire claim map.

Jump to

Keyboard shortcuts

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