idp

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 1 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package idp is the plugin for Identity Provider.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetValueWithKey

func GetValueWithKey(data map[string]any, key string) any

GetValueWithKey returns the value of the key in the data. The key is a dot-separated path, so a nested claim such as "realm_access.roles" resolves.

func GroupValues

func GroupValues(claim any) ([]string, bool)

GroupValues turns a provider's group claim into a list of group names. It reports whether the claim's shape was understood.

A JSON claim carrying groups is normally an array of strings. Some providers emit one delimited string instead — the `scope` convention, or a comma-joined list — so both are accepted. An unparsable shape is reported as not understood rather than as an empty list: an empty list is a provider saying "no groups", and acting on that would remove every membership of an account whose provider merely changed the claim's type.

That last point is why an array that yielded no name at all — every entry a number, or an object such as `{"id":"dev"}` — is reported as not understood too. It is a shape this cannot read, not a provider saying the account has no groups.

Types

This section is empty.

Directories

Path Synopsis
Package oauth2 is the plugin for OAuth2 Identity Provider.
Package oauth2 is the plugin for OAuth2 Identity Provider.

Jump to

Keyboard shortcuts

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