identitymodifier

package
v0.11.13 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IdentityModifier

type IdentityModifier interface {

	// Modify returns the list of given claims, after eventually applying modifications.
	// It must complete before the given context expires.
	// It will return an error if the returned slice contains claims prefixed by '@'.
	Modify(ctx context.Context, in []string) (out []string, err error)
}

An IdentityModifier can modify a set of claims that are about to be delivered.

func NewRemote

func NewRemote(m *api.IdentityModifier, src token.Source) (IdentityModifier, error)

NewRemote returns a new HTTP based IdentityModifier. The remote server will receive the given method and the claims, either as a json array in the request body (for POST/PUT/PATCH) or in the query parameter `claim` (for GET). Any other http method will make the function to return an error. The server must return 200 if it modified the list, 204 if it did not. Anything else is considered as an error.

Jump to

Keyboard shortcuts

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