auth

package
v0.41.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AmzAlgorithm                  = "X-Amz-Algorithm"
	AmzCredential                 = "X-Amz-Credential"
	AmzSignature                  = "X-Amz-Signature"
	AmzSignedHeaders              = "X-Amz-SignedHeaders"
	AmzExpires                    = "X-Amz-Expires"
	AmzDate                       = "X-Amz-Date"
	AmzContentSha256              = "X-Amz-Content-Sha256"
	AuthorizationHdr              = "Authorization"
	AmzTrailer                    = "x-amz-trailer"
	ContentTypeHdr                = "Content-Type"
	ContentEncodingChunked        = "STREAMING-AWS4-HMAC-SHA256-PAYLOAD"
	UnsignedPayloadMultipleChunks = "STREAMING-UNSIGNED-PAYLOAD-TRAILER"

	UnsignedPayload = "UNSIGNED-PAYLOAD"
)

Variables

View Source
var ErrNoAuthorizationHeader = errors.New("no authorization header")

ErrNoAuthorizationHeader is returned for unauthenticated requests.

Functions

func MultipartFormValue added in v0.17.0

func MultipartFormValue(r *http.Request, key string) string

MultipartFormValue gets value by key from multipart form.

Types

type Box added in v0.26.0

type Box struct {
	AccessBox  *accessbox.Box
	ClientTime time.Time
}

Box contains access box and additional info.

type Center

type Center interface {
	Authenticate(request *http.Request) (*Box, error)
}

Center is a user authentication interface.

func New

func New(neoFS tokens.NeoFS, key *keys.PrivateKey, prefixes []string, config *cache.Config) Center

New creates an instance of AuthCenter.

type RegexpSubmatcher added in v0.24.0

type RegexpSubmatcher struct {
	// contains filtered or unexported fields
}

func NewRegexpMatcher added in v0.24.0

func NewRegexpMatcher(re *regexp.Regexp) *RegexpSubmatcher

NewRegexpMatcher creates a new regexp sub matcher.

func (*RegexpSubmatcher) GetSubmatches added in v0.24.0

func (r *RegexpSubmatcher) GetSubmatches(target string) map[string]string

GetSubmatches returns matches from provided string. Zero length indicates no match.

Directories

Path Synopsis
signer
v4

Jump to

Keyboard shortcuts

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