Documentation ¶
Index ¶
- Variables
- func NewAlwaysCreateUserIdentityToUserMapper(identityRegistry identityregistry.Registry, userRegistry userregistry.Registry) authapi.UserIdentityMapper
- func NewLookupIdentityMapper(mappings useridentitymapping.Registry, users user.Registry) authapi.UserIdentityMapper
- type UserNameGenerator
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // MaxGenerateAttempts limits how many times we try to find an available username for a new identity MaxGenerateAttempts = 100 // DefaultGenerator attempts to use the base name first, then "base2", "base3", ... DefaultGenerator = UserNameGenerator(func(base string, sequence int) string { if sequence == 0 { return base } return fmt.Sprintf("%s%d", base, sequence+1) }) )
Functions ¶
func NewAlwaysCreateUserIdentityToUserMapper ¶
func NewAlwaysCreateUserIdentityToUserMapper(identityRegistry identityregistry.Registry, userRegistry userregistry.Registry) authapi.UserIdentityMapper
NewAlwaysCreateUserIdentityToUserMapper returns an IdentityMapper that does the following: 1. Returns an existing user if the identity exists and is associated with an existing user 2. Returns an error if the identity exists and is not associated with a user 3. Creates the identity and creates and returns a new user with a unique username if the identity does not yet exist
func NewLookupIdentityMapper ¶ added in v0.4.2
func NewLookupIdentityMapper(mappings useridentitymapping.Registry, users user.Registry) authapi.UserIdentityMapper
NewLookupIdentityMapper returns a mapper that will look up existing mappings for identities
Types ¶
type UserNameGenerator ¶ added in v0.4.2
UserNameGenerator returns a username
Click to show internal directories.
Click to hide internal directories.