Documentation ¶
Index ¶
Constants ¶
View Source
const (
// SecretsNamespace is the namespace used to set/get values from the keychain.
SecretsNamespace = "auth0-cli"
)
Variables ¶
This section is empty.
Functions ¶
func RequiredScopes ¶ added in v0.5.1
func RequiredScopes() []string
RequiredScopes returns the scopes used for login.
func RequiredScopesMin ¶ added in v0.8.1
func RequiredScopesMin() []string
RequiredScopesMin returns minimum scopes used for login in integration tests.
Types ¶
type Authenticator ¶
type Authenticator struct { Audience string `env:"AUTH0_AUDIENCE,default=https://*.auth0.com/api/v2/"` ClientID string `env:"AUTH0_CLIENT_ID,default=2iZo3Uczt5LFHacKdM0zzgUO2eG2uDjT"` DeviceCodeEndpoint string `env:"AUTH0_DEVICE_CODE_ENDPOINT,default=https://auth0.auth0.com/oauth/device/code"` OauthTokenEndpoint string `env:"AUTH0_OAUTH_TOKEN_ENDPOINT,default=https://auth0.auth0.com/oauth/token"` }
Authenticator is used to facilitate the login process.
func New ¶ added in v0.11.10
func New() (*Authenticator, error)
New returns a new instance of Authenticator after decoding its parameters from env vars.
type Keyring ¶
type Keyring struct{}
type SecretStore ¶
type SecretStore interface { // Get gets the secret Get(namespace, key string) (string, error) // Delete removes the secret Delete(namespace, key string) error }
SecretStore provides access to stored sensitive data.
type State ¶
type State struct { DeviceCode string `json:"device_code"` UserCode string `json:"user_code"` VerificationURI string `json:"verification_uri_complete"` ExpiresIn int `json:"expires_in"` Interval int `json:"interval"` }
func (*State) IntervalDuration ¶
type TokenResponse ¶
type TokenRetriever ¶
type TokenRetriever struct { Authenticator *Authenticator Secrets SecretStore Client *http.Client }
func (*TokenRetriever) Delete ¶
func (t *TokenRetriever) Delete(tenant string) error
Delete deletes the given tenant from the secrets storage.
func (*TokenRetriever) Refresh ¶
func (t *TokenRetriever) Refresh(ctx context.Context, tenant string) (TokenResponse, error)
Refresh gets a new access token from the provided refresh token, The request is used the default client_id and endpoint for device authentication.
Click to show internal directories.
Click to hide internal directories.