Documentation ¶
Index ¶
- Constants
- func CreateAuthorizationBearerHeader(name string, value string) string
- func CreateAuthorizationBearerHeaderSimple(name string) string
- func CreateAuthorizationToken(name string, value string) string
- func CreateAuthorizationTokenSimple(name string) string
- func NewAuthBasicHandler(subhandler http.HandlerFunc, check Check, realm string) *authHandler
- func NewAuthHtmlHandler(subhandler http.HandlerFunc, check Check, crypter Crypter) *authHtmlHandler
- func NewCheckHandler(c func() error) *checkHandler
- func NewDebugHandler(subhandler http.Handler) *debugHandler
- func NewForwardHandler(target string, executeRequest executeRequest) *forwardHandler
- func Pad(src []byte) []byte
- func ParseAuthorizationBasisHttpRequest(req *http.Request) (string, string, error)
- func ParseAuthorizationBearerHttpRequest(req *http.Request) (string, string, error)
- func ParseAuthorizationBearerHttpRequestSimple(req *http.Request) (string, error)
- func ParseAuthorizationHeader(authtype string, header string) (string, string, error)
- func ParseAuthorizationHeaderSimple(authtype string, header string) (string, error)
- func ParseAuthorizationHttpRequest(authtype string, req *http.Request) (string, string, error)
- func ParseAuthorizationHttpRequestSimple(authtype string, req *http.Request) (string, error)
- func ParseAuthorizationToken(token string) (string, string, error)
- func ParseAuthorizationTokenSimple(token string) (string, error)
- func Unpad(src []byte) ([]byte, error)
- type CacheTTL
- type Check
- type Crypter
- type GroupName
- type LdapAuth
- type LdapAuthenticator
- type LdapBaseDn
- type LdapBindDN
- type LdapBindPassword
- type LdapGroupDn
- type LdapGroupField
- type LdapGroupFilter
- type LdapHost
- type LdapPort
- type LdapServerName
- type LdapSkipTls
- type LdapUseSSL
- type LdapUserDn
- type LdapUserField
- type LdapUserFilter
- type Password
- type UserFile
- type UserName
- type Verifier
Constants ¶
View Source
const HTML_LOGIN_FORM = `` /* 1929-byte string literal not displayed */
View Source
const HTML_REDIRECT = `` /* 1048-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func NewAuthBasicHandler ¶
func NewAuthBasicHandler(subhandler http.HandlerFunc, check Check, realm string) *authHandler
func NewAuthHtmlHandler ¶
func NewAuthHtmlHandler( subhandler http.HandlerFunc, check Check, crypter Crypter, ) *authHtmlHandler
func NewCheckHandler ¶
func NewCheckHandler(c func() error) *checkHandler
func NewDebugHandler ¶
func NewForwardHandler ¶
func NewForwardHandler(target string, executeRequest executeRequest) *forwardHandler
Types ¶
type Crypter ¶
type Crypter interface { Encrypt(text string) (string, error) Decrypt(text string) (string, error) }
func NewCrypter ¶
The key argument should be the AES key, either 16 or 32 bytes to select AES-128 or AES-256.
type LdapAuth ¶
type LdapAuth struct { LdapAuthenticator LdapAuthenticator RequiredGroups []GroupName }
type LdapAuthenticator ¶
type LdapAuthenticator interface { Authenticate(UserName, Password) (bool, map[string]string, error) GetGroupsOfUser(UserName) ([]string, error) }
func NewLdapAuthenticator ¶
func NewLdapAuthenticator( ldapBaseDn LdapBaseDn, ldapHost LdapHost, ldapServerName LdapServerName, ldapPort LdapPort, ldapUseSSL LdapUseSSL, ldapSkipTls LdapSkipTls, ldapBindDN LdapBindDN, ldapBindPassword LdapBindPassword, ldapUserDn LdapUserDn, ldapUserFilter LdapUserFilter, ldapUserField LdapUserField, ldapGroupDn LdapGroupDn, ldapGroupFilter LdapGroupFilter, ldapGroupField LdapGroupField, ) LdapAuthenticator
type LdapBaseDn ¶
type LdapBaseDn string
func (LdapBaseDn) String ¶
func (l LdapBaseDn) String() string
type LdapBindDN ¶
type LdapBindDN string
func (LdapBindDN) String ¶
func (l LdapBindDN) String() string
type LdapBindPassword ¶
type LdapBindPassword string
func (LdapBindPassword) String ¶
func (l LdapBindPassword) String() string
type LdapGroupDn ¶
type LdapGroupDn string
func (LdapGroupDn) String ¶
func (l LdapGroupDn) String() string
type LdapGroupField ¶
type LdapGroupField string
func (LdapGroupField) String ¶
func (l LdapGroupField) String() string
type LdapGroupFilter ¶
type LdapGroupFilter string
func (LdapGroupFilter) String ¶
func (l LdapGroupFilter) String() string
type LdapServerName ¶
type LdapServerName string
func (LdapServerName) String ¶
func (l LdapServerName) String() string
type LdapUserDn ¶
type LdapUserDn string
func (LdapUserDn) String ¶
func (l LdapUserDn) String() string
type LdapUserField ¶
type LdapUserField string
func (LdapUserField) String ¶
func (l LdapUserField) String() string
type LdapUserFilter ¶
type LdapUserFilter string
func (LdapUserFilter) String ¶
func (l LdapUserFilter) String() string
type Verifier ¶
func NewCacheAuth ¶
func NewCrowdAuth ¶
func NewCrowdAuth(crowdAuthenticate crowdAuthenticate) Verifier
func NewFileAuth ¶
Click to show internal directories.
Click to hide internal directories.