auth

package
v1.0.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

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

This section is empty.

Types

type LDAPClient

type LDAPClient struct {
	Conn               *ldap.Conn
	Attributes         []string
	Base               string
	BindDN             string
	BindPassword       string
	GroupFilter        string
	Host               string
	ServerName         string
	UserFilter         string
	Port               int
	InsecureSkipVerify bool
	UseSSL             bool
	SkipTLS            bool
	Timeout            time.Duration
}

func (*LDAPClient) Authenticate

func (lc *LDAPClient) Authenticate(username, password string) (string, map[string]string, error)

Authenticate authenticates the user against the ldap backend.

func (*LDAPClient) Close

func (lc *LDAPClient) Close()

Close closes the ldap backend connection.

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)
	SAMLSPGetRedirectURL(csaml *share.CLUSServerSAML, redir *api.RESTTokenRedirect) (string, error)
	SAMLSPAuth(csaml *share.CLUSServerSAML, tokenData *api.RESTAuthToken) (map[string][]string, error)
	OIDCDiscover(issuer 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() RemoteAuthInterface

Directories

Path Synopsis
Package oidc implements OpenID Connect client logic for the golang.org/x/oauth2 package.
Package oidc implements OpenID Connect client logic for the golang.org/x/oauth2 package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL