Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOIDCScopes []string = []string{oidc.ScopeOpenID, "profile", "email"}
View Source
var MandateOIDCScopes []string = []string{oidc.ScopeOpenID}
Functions ¶
func GenerateSamlSP ¶
func GenerateSamlSP(csaml *share.CLUSServerSAML, spissuer string, redirurl string, timeOverride *time.Time) (*saml2.SAMLServiceProvider, error)
Types ¶
type LDAPClient ¶
type LDAPClient struct {
Conn *ldap.Conn
Attributes []string
BaseDN string
GroupDN string
BindDN string
BindPassword string
GroupFilter string
Host string
ServerName string
UserFilter string
Port int
InsecureSkipVerify bool // Skip TLS authentication
UseSSL bool // Use SSL/TLS to connect to LDAP server
SkipTLS bool // Do not fallback to TLS
Timeout time.Duration
}
func (*LDAPClient) Authenticate ¶
Authenticate authenticates the user against the ldap backend.
func (*LDAPClient) Connect ¶
func (lc *LDAPClient) Connect() error
Connect connects to the ldap backend.
func (*LDAPClient) GetGroupsOfUser ¶
func (lc *LDAPClient) GetGroupsOfUser() ([]string, error)
GetGroupsOfUser returns the group for a user.
type RemoteAuthInterface ¶
type RemoteAuthInterface interface {
LDAPAuth(ldap *share.CLUSServerLDAP, username, password string) (map[string]string, []string, error)
SAMLSPGetLogoutURL(csaml *share.CLUSServerSAML, redir *api.RESTTokenRedirect, nameid string, sessionIndex string, overrides map[string]string) (string, error)
SAMLSPGetRedirectURL(csaml *share.CLUSServerSAML, redir *api.RESTTokenRedirect, overrides map[string]string) (string, error)
// Return Name ID, session index, and attributes.
SAMLSPAuth(csaml *share.CLUSServerSAML, tokenData *api.RESTAuthToken) (string, string, map[string][]string, error)
OIDCDiscover(issuer string, proxy string) (string, string, string, string, error)
OIDCGetRedirectURL(csaml *share.CLUSServerOIDC, redir *api.RESTTokenRedirect) (string, error)
OIDCAuth(coidc *share.CLUSServerOIDC, tokenData *api.RESTAuthToken) (map[string]interface{}, error)
}
func NewRemoteAuther ¶
func NewRemoteAuther(fakeTime *time.Time) RemoteAuthInterface
Click to show internal directories.
Click to hide internal directories.