identity

package
v0.0.0-...-6783019 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotTokenIdentity = errors.New("not a token identity")
)

Functions

This section is empty.

Types

type AuthenticateInput

type AuthenticateInput struct {
	ConfigSet config.ConfigurationSet
}

type AuthenticateOutput

type AuthenticateOutput struct {
	Identity Identity
}

type Identity

type Identity interface {
	Type() string
	Name() string
	IsExpired() bool
	IdentityProviderName() string
}

Identity represents a users identity for use with discovery. NOTE: details of this need finalising

type Provider

type Provider interface {
	provider.Plugin

	// Authenticate will authenticate a user and return details of their identity.
	Authenticate(ctx context.Context, input *AuthenticateInput) (*AuthenticateOutput, error)
}

Provider represents the interface used to implement an identity provider plugin. It provides authentication functionality.

type ProviderCreatorFun

type ProviderCreatorFun func(input *provider.PluginCreationInput) (Provider, error)

type Store

type Store interface {
	CredsExists() (bool, error)
	Save(identity Identity) error
	Load() (Identity, error)
	Expired() bool
}

Store represents an way to store and retrieve credentials

type TokenIdentity

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

func NewTokenIdentity

func NewTokenIdentity(name, token, idProviderName string) *TokenIdentity

func (*TokenIdentity) IdentityProviderName

func (t *TokenIdentity) IdentityProviderName() string

func (*TokenIdentity) IsExpired

func (t *TokenIdentity) IsExpired() bool

func (*TokenIdentity) Name

func (t *TokenIdentity) Name() string

func (*TokenIdentity) Token

func (t *TokenIdentity) Token() string

func (*TokenIdentity) Type

func (t *TokenIdentity) Type() string

Jump to

Keyboard shortcuts

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