Documentation
¶
Overview ¶
Copyright (C) 2016 H2O.ai, Inc. <http://h2o.ai/>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2016 H2O.ai, Inc. <http://h2o.ai/>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2016 H2O.ai, Inc. <http://h2o.ai/>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- type BasicLdapAuth
- func (a *BasicLdapAuth) CheckAuth(r *http.Request) string
- func (a *BasicLdapAuth) NewContext(ctx context.Context, r *http.Request) context.Context
- func (a *BasicLdapAuth) RequireAuth(w http.ResponseWriter, r *http.Request)
- func (a *BasicLdapAuth) Wrap(wrapped auth.AuthenticatedHandlerFunc) http.HandlerFunc
- type Ldap
- type LdapUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicLdapAuth ¶
type BasicLdapAuth struct { Realm string // Headers used by authenticator. Set to ProxyHeaders to use with // proxy server. When nil, NormalHeaders are used. Headers *auth.Headers Conn *Ldap }
func NewBasicLdapAuth ¶
func NewBasicLdapAuth(realm string, conn *Ldap) *BasicLdapAuth
func (*BasicLdapAuth) CheckAuth ¶
func (a *BasicLdapAuth) CheckAuth(r *http.Request) string
CheckAuth verifies the user is authenticated by either finding them in the LDAP config map or binding the LDAP
func (*BasicLdapAuth) NewContext ¶
func (*BasicLdapAuth) RequireAuth ¶
func (a *BasicLdapAuth) RequireAuth(w http.ResponseWriter, r *http.Request)
Ask for BasicAuth headers
func (*BasicLdapAuth) Wrap ¶
func (a *BasicLdapAuth) Wrap(wrapped auth.AuthenticatedHandlerFunc) http.HandlerFunc
type Ldap ¶
type Ldap struct { Address string BindDN string BindPass string `toml:"bindPassword"` UserBaseDn string UserIdAttribute string UserObjectClass string ForceBind bool // Users who are logged in Users *LdapUser // contains filtered or unexported fields }
func FromConfig ¶
type LdapUser ¶
type LdapUser struct { IdlTime time.Duration MaxTime time.Duration // contains filtered or unexported fields }