login

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StrIsEmpty added in v0.6.0

func StrIsEmpty(str string) bool

Types

type AAPOAuth added in v0.6.0

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

func NewAAPOAuth2Config added in v0.6.0

func NewAAPOAuth2Config(caFile, clientId, authUrl string, insecure bool) AAPOAuth

func (AAPOAuth) Auth added in v0.6.0

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

func (AAPOAuth) Renew added in v0.6.0

func (o AAPOAuth) Renew(refreshToken string) (AuthInfo, error)

func (AAPOAuth) Validate added in v0.6.0

func (o AAPOAuth) Validate(args ValidateArgs) error

type AAPRoundTripper added in v0.6.0

type AAPRoundTripper struct {
	Transport http.RoundTripper
}

func (*AAPRoundTripper) RoundTrip added in v0.6.0

func (c *AAPRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

type AuthInfo added in v0.6.0

type AuthInfo struct {
	AccessToken  string
	RefreshToken string
	ExpiresIn    *int64
}

type AuthProvider

type AuthProvider interface {
	Auth(web bool, username, password string) (AuthInfo, error)
	Renew(refreshToken string) (AuthInfo, error)
	Validate(args ValidateArgs) error
}

type GetClientFunc added in v0.6.0

type GetClientFunc func(callbackURL string) (*osincli.Client, error)

type K8sOauth added in v0.6.0

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

func NewK8sOAuth2Config

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

func (K8sOauth) Auth added in v0.6.0

func (k K8sOauth) Auth(web bool, username, password string) (AuthInfo, error)

func (K8sOauth) Renew added in v0.6.0

func (k K8sOauth) Renew(refreshToken string) (AuthInfo, error)

func (K8sOauth) Validate added in v0.6.0

func (k K8sOauth) Validate(args ValidateArgs) error

type OIDC

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

func NewOIDCConfig

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

func (OIDC) Auth

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

func (OIDC) Renew added in v0.6.0

func (o OIDC) Renew(refreshToken string) (AuthInfo, error)

func (OIDC) Validate added in v0.6.0

func (o OIDC) Validate(args ValidateArgs) error

type OIDCDirectResponse

type OIDCDirectResponse struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	ExpiresIn    *int64 `json:"expires_in"` // ExpiresIn in seconds
}

type OauthServerResponse

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

type ValidateArgs added in v0.6.0

type ValidateArgs struct {
	ApiUrl      string
	ClientId    string
	AccessToken string
	Username    string
	Password    string
	Web         bool
}

Jump to

Keyboard shortcuts

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