idpcache

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package idpcache implements a cache of active identity providers.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoSuchIDP is returned by Cache.AuthenticateTokenCredentialRequest() when the requested IDP is not configured.
	ErrNoSuchIDP = fmt.Errorf("no such identity provider")
)

Functions

This section is empty.

Types

type Cache

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

Cache implements the authenticator.Token interface by multiplexing across a dynamic set of identity providers loaded from IDP resources.

func New

func New() *Cache

New returns an empty cache.

func (*Cache) AuthenticateTokenCredentialRequest

func (c *Cache) AuthenticateTokenCredentialRequest(ctx context.Context, req *loginapi.TokenCredentialRequest) (user.Info, error)

func (*Cache) Delete

func (c *Cache) Delete(key Key)

Delete an identity provider from the cache.

func (*Cache) Get

func (c *Cache) Get(key Key) Value

Get an identity provider by key.

func (*Cache) Keys

func (c *Cache) Keys() []Key

Keys currently stored in the cache.

func (*Cache) Store

func (c *Cache) Store(key Key, value Value)

Store an identity provider into the cache.

type Key

type Key struct {
	APIGroup  string
	Kind      string
	Namespace string
	Name      string
}

type Value

type Value interface {
	authenticator.Token
}

Jump to

Keyboard shortcuts

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