Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultUserIdentityInfo ¶
func NewDefaultUserIdentityInfo ¶
func NewDefaultUserIdentityInfo(username string) DefaultUserIdentityInfo
NewDefaultUserIdentityInfo returns a DefaultUserIdentity info with a non-nil Extra component
func (*DefaultUserIdentityInfo) GetExtra ¶
func (i *DefaultUserIdentityInfo) GetExtra() map[string]string
func (*DefaultUserIdentityInfo) GetProviderName ¶
func (i *DefaultUserIdentityInfo) GetProviderName() string
func (*DefaultUserIdentityInfo) GetUserName ¶
func (i *DefaultUserIdentityInfo) GetUserName() string
type UserIdentityInfo ¶
type UserIdentityInfo interface { // GetUserName uniquely identifies this particular identity for this provider. It is NOT guaranteed to be unique across providers GetUserName() string // GetProviderName returns the name of the provider of this identity. GetProviderName() 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.
Click to show internal directories.
Click to hide internal directories.