auth

package
v1.0.42 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const LOGGED_IN_PAGE_HTML = `` /* 2413-byte string literal not displayed */
View Source
const TokenRoute = "/connect/token"

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	Auth(ctx AuthenticatorContext) AuthenticatorResult
}

type AuthenticatorContext

type AuthenticatorContext struct {
	Type     string                 `json:"type"`
	Config   map[string]interface{} `json:"config"`
	Debug    bool                   `json:"debug"`
	Insecure bool                   `json:"insecure"`
	Request  AuthenticatorRequest   `json:"request"`
}

func NewAuthenticatorContext

func NewAuthenticatorContext(
	authType string,
	config map[string]interface{},
	debug bool,
	insecure bool,
	request AuthenticatorRequest) *AuthenticatorContext

type AuthenticatorRequest

type AuthenticatorRequest struct {
	URL    string            `json:"url"`
	Header map[string]string `json:"header"`
}

func NewAuthenticatorRequest

func NewAuthenticatorRequest(
	url string,
	header map[string]string) *AuthenticatorRequest

type AuthenticatorResult

type AuthenticatorResult struct {
	Error         string                 `json:"error"`
	RequestHeader map[string]string      `json:"requestHeader"`
	Config        map[string]interface{} `json:"config"`
}

func AuthenticatorError

func AuthenticatorError(err error) *AuthenticatorResult

func AuthenticatorSuccess

func AuthenticatorSuccess(requestHeader map[string]string, config map[string]interface{}) *AuthenticatorResult

type BearerAuthenticator

type BearerAuthenticator struct {
	Cache cache.Cache
}

func (BearerAuthenticator) Auth

type BearerAuthenticatorConfig

type BearerAuthenticatorConfig struct {
	ClientId     string
	ClientSecret string
	IdentityUri  *url.URL
}

func NewBearerAuthenticatorConfig

func NewBearerAuthenticatorConfig(
	clientId string,
	clientSecret string,
	identityUri *url.URL) *BearerAuthenticatorConfig

type BrowserLauncher added in v1.0.8

type BrowserLauncher interface {
	OpenBrowser(url string) error
}

type ExecBrowserLauncher added in v1.0.8

type ExecBrowserLauncher struct{}

func (ExecBrowserLauncher) OpenBrowser added in v1.0.8

func (l ExecBrowserLauncher) OpenBrowser(url string) error

type ExternalAuthenticator

type ExternalAuthenticator struct {
	Config ExternalAuthenticatorConfig
}

func (ExternalAuthenticator) Auth

type ExternalAuthenticatorConfig

type ExternalAuthenticatorConfig struct {
	Name string
	Path string
}

func NewExternalAuthenticatorConfig

func NewExternalAuthenticatorConfig(
	name string,
	path string) *ExternalAuthenticatorConfig

type OAuthAuthenticator added in v1.0.1

type OAuthAuthenticator struct {
	Cache           cache.Cache
	BrowserLauncher BrowserLauncher
}

func (OAuthAuthenticator) Auth added in v1.0.1

type OAuthAuthenticatorConfig added in v1.0.1

type OAuthAuthenticatorConfig struct {
	ClientId    string
	RedirectUrl url.URL
	Scopes      string
	IdentityUri *url.URL
}

func NewOAuthAuthenticatorConfig added in v1.0.1

func NewOAuthAuthenticatorConfig(
	clientId string,
	redirectUrl url.URL,
	scopes string,
	identityUri *url.URL) *OAuthAuthenticatorConfig

type PatAuthenticator added in v1.0.2

type PatAuthenticator struct{}

func (PatAuthenticator) Auth added in v1.0.2

type SecretGenerator added in v1.0.1

type SecretGenerator struct{}

func (SecretGenerator) GeneratePkce added in v1.0.1

func (g SecretGenerator) GeneratePkce() (string, string)

func (SecretGenerator) GenerateState added in v1.0.1

func (g SecretGenerator) GenerateState() string

Jump to

Keyboard shortcuts

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