Documentation ¶
Index ¶
- Constants
- type LDAPIdentifierBackend
- func (b *LDAPIdentifierBackend) DestroySession(ctx context.Context, sessionRef *string) error
- func (b *LDAPIdentifierBackend) GetUser(ctx context.Context, entryID string, sessionRef *string, ...) (backends.UserFromBackend, error)
- func (b *LDAPIdentifierBackend) Logon(ctx context.Context, audience, username, password string) (bool, *string, *string, backends.UserFromBackend, error)
- func (b *LDAPIdentifierBackend) Name() string
- func (b *LDAPIdentifierBackend) RefreshSession(ctx context.Context, userID string, sessionRef *string, ...) error
- func (b *LDAPIdentifierBackend) ResolveUserByUsername(ctx context.Context, username string) (backends.UserFromBackend, error)
- func (b *LDAPIdentifierBackend) RunWithContext(ctx context.Context) error
- func (b *LDAPIdentifierBackend) ScopesMeta() *scopes.Scopes
- func (b *LDAPIdentifierBackend) ScopesSupported() []string
- func (b *LDAPIdentifierBackend) UserClaims(userID string, authorizedScopes map[string]bool) map[string]interface{}
Constants ¶
const ( AttributeDN = "dn" AttributeLogin = "uid" AttributeEmail = "mail" AttributeName = "cn" AttributeFamilyName = "sn" AttributeGivenName = "givenName" AttributeUUID = "uuid" )
Define some known LDAP attribute descriptors.
const ( AttributeValueTypeText = "text" AttributeValueTypeBinary = "binary" AttributeValueTypeUUID = "uuid" )
Define our known LDAP attribute value types.
const (
AttributeNumericUID = "konnectNumericID"
)
Additional mappable virtual attributes.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LDAPIdentifierBackend ¶
type LDAPIdentifierBackend struct {
// contains filtered or unexported fields
}
LDAPIdentifierBackend is a backend for the Identifier which connects LDAP.
func NewLDAPIdentifierBackend ¶
func NewLDAPIdentifierBackend( c *config.Config, tlsConfig *tls.Config, uriString, bindDN, bindPassword, baseDN, scopeString, filter string, subAttributes []string, mappedAttributes map[string]string, ) (*LDAPIdentifierBackend, error)
NewLDAPIdentifierBackend creates a new LDAPIdentifierBackend with the provided parameters.
func (*LDAPIdentifierBackend) DestroySession ¶
func (b *LDAPIdentifierBackend) DestroySession(ctx context.Context, sessionRef *string) error
DestroySession implements the Backend interface providing destroy to KC session.
func (*LDAPIdentifierBackend) GetUser ¶
func (b *LDAPIdentifierBackend) GetUser(ctx context.Context, entryID string, sessionRef *string, requestedScopes map[string]bool) (backends.UserFromBackend, error)
GetUser implements the Backend interface, providing user meta data retrieval for the user specified by the userID. Requests are bound to the provided context.
func (*LDAPIdentifierBackend) Logon ¶
func (b *LDAPIdentifierBackend) Logon(ctx context.Context, audience, username, password string) (bool, *string, *string, backends.UserFromBackend, error)
Logon implements the Backend interface, enabling Logon with user name and password as provided. Requests are bound to the provided context.
func (*LDAPIdentifierBackend) Name ¶
func (b *LDAPIdentifierBackend) Name() string
Name implements the Backend interface.
func (*LDAPIdentifierBackend) RefreshSession ¶
func (b *LDAPIdentifierBackend) RefreshSession(ctx context.Context, userID string, sessionRef *string, claims map[string]interface{}) error
RefreshSession implements the Backend interface.
func (*LDAPIdentifierBackend) ResolveUserByUsername ¶
func (b *LDAPIdentifierBackend) ResolveUserByUsername(ctx context.Context, username string) (backends.UserFromBackend, error)
ResolveUserByUsername implements the Beckend interface, providing lookup for user by providing the username. Requests are bound to the provided context.
func (*LDAPIdentifierBackend) RunWithContext ¶
func (b *LDAPIdentifierBackend) RunWithContext(ctx context.Context) error
RunWithContext implements the Backend interface.
func (*LDAPIdentifierBackend) ScopesMeta ¶
func (b *LDAPIdentifierBackend) ScopesMeta() *scopes.Scopes
ScopesMeta implements the Backend interface, providing meta data for supported scopes.
func (*LDAPIdentifierBackend) ScopesSupported ¶
func (b *LDAPIdentifierBackend) ScopesSupported() []string
ScopesSupported implements the Backend interface, providing supported scopes when running this backend.
func (*LDAPIdentifierBackend) UserClaims ¶
func (b *LDAPIdentifierBackend) UserClaims(userID string, authorizedScopes map[string]bool) map[string]interface{}
UserClaims implements the Backend interface, providing user specific claims for the user specified by the userID.