auth

package
v1.20.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 3 Imported by: 390

Documentation

Overview

Package auth defines protocol-agnostic authentication types for smithy clients.

Index

Constants

View Source
const (
	SchemeIDHTTPBasic  = "smithy.api#httpBasicAuth"
	SchemeIDHTTPDigest = "smithy.api#httpDigestAuth"
	SchemeIDHTTPBearer = "smithy.api#httpBearerAuth"
	SchemeIDHTTPAPIKey = "smithy.api#httpApiKeyAuth"
)

HTTP auth schemes

View Source
const (
	SchemeIDSigV4  = "aws.auth#sigv4"
	SchemeIDSigV4A = "aws.auth#sigv4a"
)

AWS auth schemes

View Source
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 Identity

type Identity interface {
	Expiration() time.Time
}

Identity contains information that identifies who the user making the request is.

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

func GetAuthOptions(p *smithy.Properties) ([]*Option, bool)

GetAuthOptions gets auth Options from Properties.

Directories

Path Synopsis
Package bearer provides middleware and utilities for authenticating API operation calls with a Bearer Token.
Package bearer provides middleware and utilities for authenticating API operation calls with a Bearer Token.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL