Documentation ¶
Index ¶
- type LdapGroup
- type LdapProvider
- func (l *LdapProvider) Authorize(un, pw string) easyauth.Role
- func (l *LdapProvider) GetRequiredFields() []string
- func (l *LdapProvider) GetUser(r *http.Request) (*easyauth.User, error)
- func (l *LdapProvider) HandlePost(w http.ResponseWriter, r *http.Request)
- func (l *LdapProvider) Logout(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LdapProvider ¶
type LdapProvider struct { //name of domain Domain string //user base dn (for LDAP Auth) UserBaseDn string //server to query LdapAddr string //if untrusted certs should be allowed AllowInsecure bool //Permissions granted to any user who successfully authenticates DefaultPermission easyauth.Role //List of groups to grant additional permissions Groups []*LdapGroup //Individual user permissions Users map[string]easyauth.Role //Root search path to check group memberships. Ex "DC=myorg,DC=com" RootSearchPath string //Name to use for cookie CookieName string // Function to call on successful login. Can change user data or roles if desired. // return non-nil error to deny the login OnLogin func(u *easyauth.User) error OnLoginFail func(string) }
func (*LdapProvider) GetRequiredFields ¶
func (l *LdapProvider) GetRequiredFields() []string
func (*LdapProvider) HandlePost ¶
func (l *LdapProvider) HandlePost(w http.ResponseWriter, r *http.Request)
func (*LdapProvider) Logout ¶
func (l *LdapProvider) Logout(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.