Commit Graph

22 Commits

Author SHA1 Message Date
shoopea 42ddb5a83e migrate 2024-01-20 11:02:25 +01: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
Ringo Hoffmann c7b1ff8a5e
Improve Error Handling (#54)
* bubble up request errors [#28]

* inhibit stream close on request

* add `StatusError`

* `PUT`: check if given target is a directory

* Revert "inhibit stream close on request"

Cherry-picked into branch dev-bodyclosing.

This reverts commit 2889239999.

Co-authored-by: Christoph Polcin <coco@miconoco.de>
2022-01-28 17:20:35 +01:00
vitalii 321978fa73 ref: make names more descriptive 2019-12-15 01:31:08 +02:00
vitalii c4c707907d fix method of getting user's home path 2019-12-15 01:28:41 +02:00
vitalii 38f79aeaf1 fix uploading file with wrong content. close #30 2019-01-03 20:40:47 +02:00
vitalii 6c32839dbd fix import for command line tool 2018-12-30 13:28:02 +02:00
vitalii 8de8ce169b Merge remote-tracking branch 'upstream/master' 2018-07-17 14:00:43 +03:00
Christoph Polcin 45a56c2115 cmd: remove Connect() due to #16 2018-07-13 12:11:56 +02:00
vitalii 21d86ab356 use import of current fork (instead of original project) 2018-06-20 03:19:23 +03:00
Aaron Bieber a33240e4ab add ability to read login / pw from ~/.netrc 2018-05-26 01:36:44 +02:00
Christoph Polcin 5bedad6f1e cmd: refactor method 2018-05-25 20:31:58 +02:00
Christoph Polcin 31e0b57e53 cmd: PUT with optinal FILE argument 2018-05-25 20:27:56 +02:00
Christoph Polcin ba3a71318b cmd: refactor output message 2018-05-25 19:58:46 +02:00
Christoph Polcin fa51555f16 cmd: simplify arg handling 2018-05-25 12:28:37 +02:00
Christoph Polcin e0b778960b cmd: GET with optional FILE argument 2018-05-25 12:28:37 +02:00
Christoph Polcin a98da9745e cmd: create parent directories if writing files 2018-05-25 12:28:37 +02:00
Christoph Polcin 1786d37966 ignore second cmd arg 2018-05-25 12:28:37 +02:00
Christoph Polcin d6b82df09a update cmd usage 2018-05-25 12:28:34 +02:00
Christoph Polcin c16034adb0 refactor getCmd 2018-05-25 10:15:26 +02:00
Christoph Polcin 3993494db0 refactor cmd 2018-05-24 01:24:25 +02:00
Christoph Polcin 056ad2c4d5 refactor main 2018-05-16 12:23:42 +02:00