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
Click to show internal directories.
Click to hide internal directories.