Documentation
¶
Overview ¶
Package ldap is a provider of an LDAP directory, which is signed in with a username and password, which is checked with a bind as the user, whose groups are the identity's.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Manager ¶
type Manager interface {
Get(ctx context.Context, dn string, attrs ...string) (*ldapschema.Object, error)
GetUser(ctx context.Context, name string) (*ldapschema.Object, error)
ListUsers(ctx context.Context, req ldapschema.UserListRequest) (*ldapschema.ObjectList, error)
Bind(ctx context.Context, dn, password string) (*ldapschema.Object, error)
ListGroups(ctx context.Context, req ldapschema.GroupListRequest) (*ldapschema.ObjectList, error)
Status() ldapschema.Status
}
Manager is what the provider needs of an LDAP manager: a user, by name, a bind, which checks a password, the groups a user is in, and the directory's status, for the identity's issuer
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider is an LDAP directory, through its manager
func (*Provider) Exchange ¶
func (p *Provider) Exchange(ctx context.Context, credential schema.Credential) (*schema.Identity, error)
Exchange checks the username's password, with a bind as the user, and returns its identity: by its DN, with its email address, name, and the groups it's in. A user who isn't found, and a password which isn't right, are the same error, so which isn't said.
type Users ¶
type Users struct {
// contains filtered or unexported fields
}
Users are the directory's users, as a user store, whose scopes are their groups'
func NewUsers ¶
NewUsers returns the users of the manager's directory, whose scopes are those of the groups they're in, which scopes has, by the groups' names, in any case
func (*Users) User ¶
User returns the user an identity is: one which signed in with the directory, by its DN, when its identifier is still the identity's subject, so it isn't another user with the DN, or one from another provider, by its verified email address, which is one user's mail. Others aren't found.