...

Package smithy

import "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
Overview
Index

Overview ▾

Package smithy adapts concrete AWS auth and signing types to the generic smithy versions.

type BearerTokenAdapter

BearerTokenAdapter adapts smithy bearer.Token to smithy auth.Identity.

type BearerTokenAdapter struct {
    Token bearer.Token
}

func (*BearerTokenAdapter) Expiration

func (v *BearerTokenAdapter) Expiration() time.Time

Expiration returns the time of expiration for the token.

type BearerTokenProviderAdapter

BearerTokenProviderAdapter adapts smithy bearer.TokenProvider to smithy auth.IdentityResolver.

type BearerTokenProviderAdapter struct {
    Provider bearer.TokenProvider
}

func (*BearerTokenProviderAdapter) GetIdentity

func (v *BearerTokenProviderAdapter) GetIdentity(ctx context.Context, _ smithy.Properties) (
    auth.Identity, error,
)

GetIdentity retrieves a bearer token using the underlying provider.

type BearerTokenSignerAdapter

BearerTokenSignerAdapter adapts smithy bearer.Signer to smithy http auth.Signer.

type BearerTokenSignerAdapter struct {
    Signer bearer.Signer
}

func (*BearerTokenSignerAdapter) SignRequest

func (v *BearerTokenSignerAdapter) SignRequest(ctx context.Context, r *smithyhttp.Request, identity auth.Identity, _ smithy.Properties) error

SignRequest signs the request with the provided bearer token.

type CredentialsAdapter

CredentialsAdapter adapts aws.Credentials to auth.Identity.

type CredentialsAdapter struct {
    Credentials aws.Credentials
}

func (*CredentialsAdapter) Expiration

func (v *CredentialsAdapter) Expiration() time.Time

Expiration returns the time of expiration for the credentials.

type CredentialsProviderAdapter

CredentialsProviderAdapter adapts aws.CredentialsProvider to auth.IdentityResolver.

type CredentialsProviderAdapter struct {
    Provider aws.CredentialsProvider
}

func (*CredentialsProviderAdapter) GetIdentity

func (v *CredentialsProviderAdapter) GetIdentity(ctx context.Context, _ smithy.Properties) (
    auth.Identity, error,
)

GetIdentity retrieves AWS credentials using the underlying provider.

type V4SignerAdapter

V4SignerAdapter adapts v4.HTTPSigner to smithy http.Signer.

type V4SignerAdapter struct {
    Signer     v4.HTTPSigner
    Logger     logging.Logger
    LogSigning bool
}

func (*V4SignerAdapter) SignRequest

func (v *V4SignerAdapter) SignRequest(ctx context.Context, r *smithyhttp.Request, identity auth.Identity, props smithy.Properties) error

SignRequest signs the request with the provided identity.