Documentation ¶
Index ¶
Constants ¶
const ( // IdentityDisplayNameKey is the key for an optional display name in an identity's Extra map IdentityDisplayNameKey = "name" // IdentityEmailKey is the key for an optional email address in an identity's Extra map IdentityEmailKey = "email" // IdentityPreferredUsernameKey is the key for an optional preferred username in an identity's Extra map. // This is useful when the immutable providerUserName is different than the login used to authenticate // If present, this extra value is used as the preferred username IdentityPreferredUsernameKey = "preferred_username" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultUserIdentityInfo ¶
type DefaultUserIdentityInfo struct { ProviderName string ProviderUserName string Extra map[string]string }
func NewDefaultUserIdentityInfo ¶
func NewDefaultUserIdentityInfo(providerName, providerUserName string) *DefaultUserIdentityInfo
NewDefaultUserIdentityInfo returns a DefaultUserIdentityInfo with a non-nil Extra component
func (*DefaultUserIdentityInfo) GetExtra ¶
func (i *DefaultUserIdentityInfo) GetExtra() map[string]string
func (*DefaultUserIdentityInfo) GetIdentityName ¶
func (i *DefaultUserIdentityInfo) GetIdentityName() string
func (*DefaultUserIdentityInfo) GetProviderName ¶
func (i *DefaultUserIdentityInfo) GetProviderName() string
func (*DefaultUserIdentityInfo) GetProviderUserName ¶
func (i *DefaultUserIdentityInfo) GetProviderUserName() string
type OAuthClientGetter ¶
type OAuthClientGetter interface {
Get(name string, options metav1.GetOptions) (*oauthapi.OAuthClient, error)
}
OAuthClientGetter exposes a way to get a specific client. This is useful for other registries to get scope limitations on particular clients. This interface will make its easier to write a future cache on it
type ProviderInfo ¶
type ProviderInfo struct { // Name is unique and corresponds to the name of the identity provider in the oauth configuration Name string // URL to login using this identity provider URL string }
ProviderInfo represents display information for an oauth identity provider. This is used by the selection provider template to render links to login using different identity providers.
type UserIdentityInfo ¶
type UserIdentityInfo interface { // GetIdentityName returns the name of this identity. It must be equal to GetProviderName() + ":" + GetProviderUserName() GetIdentityName() string // GetProviderName returns the name of the provider of this identity. GetProviderName() string // GetProviderUserName uniquely identifies this particular identity for this provider. It is NOT guaranteed to be unique across providers GetProviderUserName() string // GetExtra is a map to allow providers to add additional fields that they understand GetExtra() map[string]string }
UserIdentityInfo contains information about an identity. Identities are distinct from users. An authentication server of some kind (like oauth for example) describes an identity. Our system controls the users mapped to this identity.
type UserIdentityMapper ¶
type UserIdentityMapper interface { // UserFor takes an identity, ignores the passed identity.Provider, forces the provider value to some other value and then creates the mapping. // It returns the corresponding user.Info UserFor(identityInfo UserIdentityInfo) (user.Info, error) }
UserIdentityMapper maps UserIdentities into user.Info objects to allow different user abstractions within auth code.