saml

package
v1.4.17 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Config *Config
	// contains filtered or unexported fields
}

Backend represents authentication provider with SAML backend.

func NewDatabaseBackend

func NewDatabaseBackend(cfg *Config, logger *zap.Logger) *Backend

NewDatabaseBackend return an instance of authentication provider with SAML backend.

func (*Backend) Authenticate

func (b *Backend) Authenticate(r *requests.Request) error

Authenticate performs authentication.

func (*Backend) Configure added in v1.4.7

func (b *Backend) Configure() error

Configure configures Backend.

func (*Backend) ConfigureLogger

func (b *Backend) ConfigureLogger(logger *zap.Logger) error

ConfigureLogger configures backend with the same logger as its user.

func (*Backend) GetConfig added in v1.4.7

func (b *Backend) GetConfig() string

GetConfig returns Backend configuration.

func (*Backend) GetMethod

func (b *Backend) GetMethod() string

GetMethod returns the authentication method associated with this backend.

func (*Backend) GetName

func (b *Backend) GetName() string

GetName return the name associated with this backend.

func (*Backend) GetRealm

func (b *Backend) GetRealm() string

GetRealm return authentication realm.

func (*Backend) Request added in v1.4.7

func (b *Backend) Request(op operator.Type, r *requests.Request) error

Request performs the requested backend operation.

func (*Backend) Validate

func (b *Backend) Validate() error

Validate checks whether Backend is functional.

func (*Backend) ValidateConfig

func (b *Backend) ValidateConfig() error

ValidateConfig checks whether Backend has mandatory configuration.

type Config added in v1.4.7

type Config struct {
	// Name is the unique name associated with the Backend..
	Name string `json:"name,omitempty"`
	// Method the name of the authentication method associated with the Backend.
	Method string `json:"method,omitempty"`
	// Realm the authentication realm associated with the Backend.
	Realm string `json:"realm,omitempty"`
	// Provider is the name of the provider associated with the Backend, e.g. azure.
	Provider string `json:"provider,omitempty"`
	// IdpMetadataLocation is the path to the Identity Provider metadata.
	IdpMetadataLocation string `json:"idp_metadata_location,omitempty"`
	// IdpSignCertLocation is the path to the Identity Provider signing certificate.
	IdpSignCertLocation string `json:"idp_sign_cert_location,omitempty"`
	// TenantID is the tenant ID associated with the Backend.
	TenantID string `json:"tenant_id,omitempty"`
	// ApplicationID is the application ID associated with the Backend.
	ApplicationID string `json:"application_id,omitempty"`
	// ApplicationName  is the application name associated with the Backend.
	ApplicationName string `json:"application_name,omitempty"`
	// EntityID is the "Identifier (Entity ID)" an administrator
	// specifies in "Set up Single Sign-On with SAML" in Azure AD
	// Enterprise Applications.
	EntityID string `json:"entity_id,omitempty"`
	// AssertionConsumerServiceURLs is the list of URLs server instance is listening
	// on. These URLs are known as SP Assertion Consumer Service endpoints. For
	// example, users may access a website via http://app.domain.local. At the
	// same time the users may access it by IP, e.g. http://10.10.10.10. or
	// by name, i.e. app. Each of the URLs is a separate endpoint.
	AssertionConsumerServiceURLs []string `json:"acs_urls,omitempty"`
}

Config holds the configuration for the Backend.

Jump to

Keyboard shortcuts

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