Commit Graph

8 Commits

Author SHA1 Message Date
Christoph Polcin
d59c1705b2 Explicit assignment of struct fields 2023-06-22 13:32:03 +02:00
Christoph Polcin
ca40e2802e Feat: Authentication API
The changes simplify the `req` method by moving the
authentication-related code into the API.
This makes it easy to add additional authentication methods.

The API introduces an `Authorizer` that acts as an
authenticator factory. The authentication flow itself
is divided down into `Authorize` and `Verify` steps in order
to encapsulate and control complex authentication challenges.

The default `NewAutoAuth` negotiates the algorithms.
Under the hood, it creates an authenticator shim per request,
which delegates the authentication flow to our authenticators.

The `NewEmptyAuth` and `NewPreemptiveAuth` authorizers
allow you to have more control over algorithms and resources.

The API also allows interception of the redirect mechanism by setting
the `XInhibitRedirect` header.

This closes: #15 #24 #38
2023-06-22 13:32:03 +02:00
yyeltsyn
cd21842fb6
fix: Allow concurrent use for DigestAuth (#69)
fix: Allow concurrent use for DigestAuth
2023-02-03 18:59:54 +01:00
Jarek Kowalski
617404b525 fixed panic due to concurrent map writes
Fixes #36
2020-09-28 11:17:19 +02:00
Christoph Polcin
28039fda22 fmt 2018-07-13 12:12:09 +02:00
Vitalii
ec1263db2f all cases of Digest authorization was implemented (#19)
Digest authentication was improved
2018-07-10 18:51:11 +02:00
Vitalii
008b27eb0f bug #14 fixed (#17)
"opaque" field should not be specified if server did not provide it
2018-06-21 10:57:32 +02:00
David
6d8c168f72 Add Authenticator interface and Digest auth support 2018-05-25 22:40:13 +02:00