login

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthProvider

type AuthProvider interface {
	Auth(web bool, username, password string) (string, error)
}

type OAuth2

type OAuth2 struct {
	ConfigUrl          string
	ClientId           string
	CAFile             string
	InsecureSkipVerify bool
}

func NewK8sOAuth2Config

func NewK8sOAuth2Config(caFile, clientId, authUrl string, insecure bool) OAuth2

func (OAuth2) Auth

func (o OAuth2) Auth(web bool, username, password string) (string, error)

func (OAuth2) GetOAuth2Config

func (o OAuth2) GetOAuth2Config() (OauthServerResponse, error)

type OIDC

type OIDC struct {
	OAuth2
}

func NewOIDCConfig

func NewOIDCConfig(caFile, clientId, authUrl string, insecure bool) OIDC

func (OIDC) Auth

func (o OIDC) Auth(web bool, username, password string) (string, error)

type OIDCDirectResponse

type OIDCDirectResponse struct {
	AccessToken string `json:"access_token"`
}

type OauthServerResponse

type OauthServerResponse struct {
	TokenEndpoint string `json:"token_endpoint"`
	AuthEndpoint  string `json:"authorization_endpoint"`
}

Jump to

Keyboard shortcuts

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