Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator struct {
Secrets SecretStore
}
type Keyring ¶
type Keyring struct{}
type SecretStore ¶
type SecretStore interface {
// Set sets the secret
Set(namespace, key, value string) error
// Get gets the secret
Get(namespace, key string) (string, error)
// Delete removes the secret
Delete(namespace, key string) error
}
SecretStore provides secure storage for 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 {
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.