Documentation ¶
Index ¶
- Constants
- Variables
- type CachedTokenProvider
- type CredentialsClient
- type CredentialsTokenProvider
- type RawToken
- type SecretCredentials
- type SecretCredentialsTokenProvider
- type SecretsClient
- type SecretsManagerTokenProviderdeprecated
- type SecretsManagerV1Client
- type SecretsManagerV2Client
- type SignInRequest
- type SignInResponse
- type TokenProvider
Constants ¶
View Source
const (
DefaultTokenType = "identityToken"
)
Variables ¶
View Source
var ( ErrIncorrectCredentials = errors.New("incorrect credentials") ErrChallenged = errors.New("user password needs to be reset") ErrTooManyRequests = errors.New("too many requests to Enlight SSO") ErrInactivated = errors.New("user has been inactivated") ErrUnknownTokenType = errors.New("provided token type not present in response") )
View Source
var (
ErrInvalidToken = errors.New("invalid token")
)
Functions ¶
This section is empty.
Types ¶
type CachedTokenProvider ¶ added in v0.8.0
type CachedTokenProvider struct { TokenProvider // contains filtered or unexported fields }
func NewCachedTokenProvider ¶ added in v0.8.0
func NewCachedTokenProvider(provider TokenProvider) *CachedTokenProvider
func (*CachedTokenProvider) GetRawToken ¶ added in v0.8.0
func (p *CachedTokenProvider) GetRawToken(ctx context.Context) (RawToken, error)
func (*CachedTokenProvider) WithClock ¶ added in v0.12.0
func (p *CachedTokenProvider) WithClock(clock func() time.Time) *CachedTokenProvider
func (*CachedTokenProvider) WithGracePeriod ¶ added in v0.8.0
func (p *CachedTokenProvider) WithGracePeriod(duration time.Duration) *CachedTokenProvider
type CredentialsClient ¶ added in v0.8.0
type CredentialsTokenProvider ¶ added in v0.8.0
type CredentialsTokenProvider struct { Username string Password string Endpoint string Client CredentialsClient TokenType string Retry retry.BackoffProvider }
func (*CredentialsTokenProvider) GetRawToken ¶ added in v0.8.0
func (provider *CredentialsTokenProvider) GetRawToken(ctx context.Context) (RawToken, error)
type RawToken ¶
type RawToken string
func (RawToken) GetRawToken ¶
func (RawToken) ParseExpires ¶ added in v0.8.0
ParseExpires attempts to extract the `exp` claim from the JWT. This function does not validate that the token is signed and should only be used if the correctness of this value is not used for security.
type SecretCredentials ¶ added in v0.8.0
type SecretCredentialsTokenProvider ¶ added in v0.8.0
type SecretCredentialsTokenProvider struct { SecretID string SecretsClient SecretsClient Client CredentialsClient TokenType string Retry retry.BackoffProvider // contains filtered or unexported fields }
func (*SecretCredentialsTokenProvider) GetRawToken ¶ added in v0.8.0
func (provider *SecretCredentialsTokenProvider) GetRawToken(ctx context.Context) (_ RawToken, err error)
type SecretsClient ¶ added in v0.8.0
type SecretsManagerTokenProvider
deprecated
type SecretsManagerTokenProvider struct { Config secretsmanagerauth.Config // contains filtered or unexported fields }
Deprecated: Use CredentialsTokenProvider instead
func (*SecretsManagerTokenProvider) GetRawToken ¶
func (provider *SecretsManagerTokenProvider) GetRawToken(ctx context.Context) (RawToken, error)
type SecretsManagerV1Client ¶ added in v0.8.0
type SecretsManagerV1Client struct {
*sm_v1.SecretsManager
}
func (SecretsManagerV1Client) GetSecretByID ¶ added in v0.8.0
type SecretsManagerV2Client ¶ added in v0.8.0
func (SecretsManagerV2Client) GetSecretByID ¶ added in v0.8.0
type SignInRequest ¶ added in v0.8.0
type SignInResponse ¶ added in v0.8.0
Click to show internal directories.
Click to hide internal directories.