auth

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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