package
1.1.3
Repository: https://github.com/infinitbyte/framework.git
Documentation: pkg.go.dev

# Functions

AuthorizationParser return a credentials parser, where credentials extracted form Authorization header.
New return new auth.Strategy.
NewCached return new auth.Strategy.
SetComparator set password comparator, to be used when caching the auth decision.
SetHash apply password hashing using h, SetHash only used when caching the auth decision, to mitigates brute force attacks.
SetParser set credentials parser.
SetUserNameHash apply username hashing based on HMAC with h and key, SetUserNameHash only used when caching the auth decision, to prevent precomputation and length extension attacks, and to mitigates hash map DOS attacks via collisions.

# Constants

ExtensionKey represents a key for the password in info extensions.

# Variables

ErrInvalidCredentials is returned by Authenticate Strategy method, when user password is invalid.
ErrMissingPrams is returned by Authenticate Strategy method, when failed to retrieve user credentials from request.

# Interfaces

Comparator is the interface implemented by types, that can generate password hash and compares the hashed password with its possible plaintext equivalent.
Parser parse and extract user credentials from incoming HTTP request.

# Type aliases

AuthenticateFunc declare custom function to authenticate request using user credentials.