HTTP auth schemes
const ( SchemeIDHTTPBasic = "smithy.api#httpBasicAuth" SchemeIDHTTPDigest = "smithy.api#httpDigestAuth" SchemeIDHTTPBearer = "smithy.api#httpBearerAuth" SchemeIDHTTPAPIKey = "smithy.api#httpApiKeyAuth" )
AWS auth schemes
const ( SchemeIDSigV4 = "aws.auth#sigv4" SchemeIDSigV4A = "aws.auth#sigv4a" )
Anonymous
const (
SchemeIDAnonymous = "smithy.api#noAuth"
)
func SetAuthOptions(p *smithy.Properties, options []*Option)
SetAuthOptions sets auth Options on Properties.
AnonymousIdentity is a sentinel to indicate no identity.
type AnonymousIdentity struct{}
func (*AnonymousIdentity) Expiration() time.Time
Expiration returns the zero value for time, as anonymous identity never expires.
AnonymousIdentityResolver returns AnonymousIdentity.
type AnonymousIdentityResolver struct{}
func (*AnonymousIdentityResolver) GetIdentity(_ context.Context, _ smithy.Properties) (Identity, error)
GetIdentity returns AnonymousIdentity.
Identity contains information that identifies who the user making the request is.
type Identity interface { Expiration() time.Time }
IdentityResolver defines the interface through which an Identity is retrieved.
type IdentityResolver interface { GetIdentity(context.Context, smithy.Properties) (Identity, error) }
IdentityResolverOptions defines the interface through which an entity can be queried to retrieve an IdentityResolver for a given auth scheme.
type IdentityResolverOptions interface { GetIdentityResolver(schemeID string) IdentityResolver }
Option represents a possible authentication method for an operation.
type Option struct { SchemeID string IdentityProperties smithy.Properties SignerProperties smithy.Properties }
func GetAuthOptions(p *smithy.Properties) ([]*Option, bool)
GetAuthOptions gets auth Options from Properties.