core

package
v1.2.10 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRequestID

func GetRequestID(r *http.Request) string

GetRequestID returns request ID.

Types

type AuthPortal

type AuthPortal struct {
	Name                     string                      `json:"-"`
	Provisioned              bool                        `json:"-"`
	ProvisionFailed          bool                        `json:"-"`
	PrimaryInstance          bool                        `json:"primary,omitempty"`
	Context                  string                      `json:"context,omitempty"`
	AuthURLPath              string                      `json:"auth_url_path,omitempty"`
	UserInterface            *ui.UserInterfaceParameters `json:"ui,omitempty"`
	UserRegistration         *registration.Registration  `json:"registration,omitempty"`
	UserRegistrationDatabase *identity.Database          `json:"-"`
	Cookies                  *cookies.Cookies            `json:"cookies,omitempty"`
	Backends                 []backends.Backend          `json:"backends,omitempty"`
	TokenProvider            *jwt.CommonTokenConfig      `json:"jwt,omitempty"`
	EnableSourceIPTracking   bool                        `json:"source_ip_tracking,omitempty"`
	TokenValidator           *jwt.TokenValidator         `json:"-"`
	// contains filtered or unexported fields
}

AuthPortal implements Form-Based, Basic, Local, LDAP, OpenID Connect, OAuth 2.0, SAML Authentication.

func (*AuthPortal) Configure

func (p *AuthPortal) Configure(upstreamOptions map[string]interface{}) error

Configure configures the instance of authentication portal.

func (*AuthPortal) ServeHTTP

func (p *AuthPortal) ServeHTTP(w http.ResponseWriter, r *http.Request, upstreamOptions map[string]interface{}) error

ServeHTTP authorizes access based on the presense and content of JWT token.

type AuthPortalManager

type AuthPortalManager struct {
	Members          []*AuthPortal
	RefMembers       map[string]*AuthPortal
	PrimaryInstances map[string]*AuthPortal
	MemberCount      int
	// contains filtered or unexported fields
}

AuthPortalManager provides access to all instances of the plugin.

var PortalManager *AuthPortalManager

PortalManager is the global authentication provider pool. It provides access to all instances of authentication portal plugin.

func (*AuthPortalManager) Provision

func (m *AuthPortalManager) Provision(name string) error

Provision provisions non-primary instances in an authentication context.

func (*AuthPortalManager) Register

func (m *AuthPortalManager) Register(p *AuthPortal) error

Register registers authentication provider instance with the pool.

Jump to

Keyboard shortcuts

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