Documentation ¶
Overview ¶
Package auth defines protocol-agnostic authentication types for smithy clients.
Index ¶
Constants ¶
const ( SchemeIDHTTPBasic = "smithy.api#httpBasicAuth" SchemeIDHTTPDigest = "smithy.api#httpDigestAuth" SchemeIDHTTPBearer = "smithy.api#httpBearerAuth" SchemeIDHTTPAPIKey = "smithy.api#httpApiKeyAuth" )
HTTP auth schemes
const ( SchemeIDSigV4 = "aws.auth#sigv4" SchemeIDSigV4A = "aws.auth#sigv4a" )
AWS auth schemes
const (
SchemeIDAnonymous = "smithy.api#noAuth"
)
Anonymous
Variables ¶
This section is empty.
Functions ¶
func SetAuthOptions ¶
func SetAuthOptions(p *smithy.Properties, options []*Option)
SetAuthOptions sets auth Options on Properties.
Types ¶
type AnonymousIdentity ¶
type AnonymousIdentity struct{}
AnonymousIdentity is a sentinel to indicate no identity.
func (*AnonymousIdentity) Expiration ¶
func (*AnonymousIdentity) Expiration() time.Time
Expiration returns the zero value for time, as anonymous identity never expires.
type AnonymousIdentityResolver ¶
type AnonymousIdentityResolver struct{}
AnonymousIdentityResolver returns AnonymousIdentity.
func (*AnonymousIdentityResolver) GetIdentity ¶
func (*AnonymousIdentityResolver) GetIdentity(_ context.Context, _ smithy.Properties) (Identity, error)
GetIdentity returns AnonymousIdentity.
type IdentityResolver ¶
type IdentityResolver interface {
GetIdentity(context.Context, smithy.Properties) (Identity, error)
}
IdentityResolver defines the interface through which an Identity is retrieved.
type IdentityResolverOptions ¶
type IdentityResolverOptions interface {
GetIdentityResolver(schemeID string) IdentityResolver
}
IdentityResolverOptions defines the interface through which an entity can be queried to retrieve an IdentityResolver for a given auth scheme.
type Option ¶
type Option struct { SchemeID string IdentityProperties smithy.Properties SignerProperties smithy.Properties }
Option represents a possible authentication method for an operation.
func GetAuthOptions ¶
GetAuthOptions gets auth Options from Properties.