Documentation
¶
Index ¶
- Constants
- func GetToken(ctx context.Context, issuerURL, clientID string, usePKCE bool, out io.Writer) error
- func GetTokenFromConfig(ctx context.Context, cfg *rest.Config) (string, error)
- func GetTokenFromExecConfig(ctx context.Context, execConfig *api.ExecConfig) (string, error)
- type DefaultTokenGetter
- type TokenGetter
- type UserInfo
Constants ¶
View Source
const ( DefaultTokenCachePath = ".kube/cache/oidc-login" IssuerURLArg = "--issuer-url=" ClientIDArg = "--client-id=" UsePKCEArg = "--use-pkce" CustomersPrefix = "/Customers/" )
Variables ¶
This section is empty.
Functions ¶
func GetToken ¶
GetToken executes the OIDC login flow using the kubelogin with the provided OIDC parameters writes the raw JSON ExecCredential result to out.
func GetTokenFromConfig ¶
GetTokenFromConfig takes a rest.Config and returns a valid OIDC access token or the static bearer token if it's set in the config.
func GetTokenFromExecConfig ¶
GetTokenFromExecConfig takes the provided execConfig, parses out the args and gets the token by executing the login flow.
Types ¶
type DefaultTokenGetter ¶
type DefaultTokenGetter struct{}
func (*DefaultTokenGetter) GetTokenString ¶
type TokenGetter ¶
Click to show internal directories.
Click to hide internal directories.