authconfig

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const BasicAuthProvider = "basic"
View Source
const GitlabAuthProvider = "gitlab"
View Source
const OIDCAuthProvider = "oidc"
View Source
const SimpleAuthProvider = "simple"

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	SessionStore *SessionStoreConfig `yaml:"sessionStore"`
	OIDC         *OIDCConfig         `yaml:"oidc"`
	Gitlab       *GitlabConfig       `yaml:"gitlab"`
	Basic        *BasicAuthConfig    `yaml:"basic"`
	Simple       *SimpleAuthConfig   `yaml:"simple"`
}

func (*AuthConfig) DesiresSignInPage added in v0.9.0

func (c *AuthConfig) DesiresSignInPage() bool

func (*AuthConfig) IsEnabled

func (c *AuthConfig) IsEnabled() bool

func (*AuthConfig) Providers

func (c *AuthConfig) Providers() []*authruntime.Provider

type BasicAuthConfig

type BasicAuthConfig struct {
	// Users is a list of htpasswd encoded username:password pairs
	// supports BCrypt, Sha, Ssha, Md5
	// example: "htpasswd -nB <username>"
	// copy the result into your user's array
	Users []string `yaml:"users"`
}

func (*BasicAuthConfig) Provider

func (c *BasicAuthConfig) Provider() *authruntime.Provider

type GitlabConfig

type GitlabConfig struct {
	Name         string   `yaml:"name"`
	BaseURL      string   `yaml:"baseURL"`
	ClientID     string   `yaml:"clientID"`
	ClientSecret string   `yaml:"clientSecret"`
	RedirectURL  string   `yaml:"redirectURL"`
	EmailDomains []string `yaml:"emailDomains"`
}

func (*GitlabConfig) Provider

func (c *GitlabConfig) Provider() *authruntime.Provider

type OIDCConfig

type OIDCConfig struct {
	Name              string                    `yaml:"name"`
	Issuer            string                    `yaml:"issuer"`
	ClientID          string                    `yaml:"clientID"`
	ClientSecret      string                    `yaml:"clientSecret"`
	Scopes            []string                  `yaml:"scopes"`
	RedirectURL       string                    `yaml:"redirectURL"`
	EmailDomains      []string                  `yaml:"emailDomains"`
	ClaimMapping      map[string]ruleExpression `yaml:"claimMapping"`
	ClaimsFromIDToken bool                      `yaml:"claimsFromIDToken"`
	AccessClaim       string                    `yaml:"accessClaim"`
}

OIDCConfig implements an OIDC client using the [Authorization Code Flow] [Authorization Code Flow]: https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth

func (*OIDCConfig) Provider

func (c *OIDCConfig) Provider() *authruntime.Provider

type SessionStoreConfig added in v0.8.2

type SessionStoreConfig struct {
	Secret string `yaml:"secret"`
}

type SimpleAuthConfig added in v0.8.0

type SimpleAuthConfig struct {
	// Users is a list of htpasswd encoded username:password pairs
	// supports BCrypt, Sha, Ssha, Md5
	// example: "htpasswd -nB <username>"
	// copy the result into your user's array
	Users []string `yaml:"users"`
}

SimpleAuthConfig is an alternative to BasicAuthConfig where the login happens through a login page and a POST request.

func (*SimpleAuthConfig) Provider added in v0.8.0

func (c *SimpleAuthConfig) Provider() *authruntime.Provider

Jump to

Keyboard shortcuts

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