auth

package
v1.28.10 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 3 Imported by: 870 modules, 840 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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