-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Authentication | ||
|
||
Inputs which carry authentication data wrap another input can be marked as such by declaring them using members of the | ||
`auth` object. Apart from predefined codecs for some authentication methods, such inputs will be treated differently] | ||
when generating documentation. Otherwise, they behave as normal inputs which map to the the given type. | ||
|
||
Currently, the following authentication inputs are available (assuming `import tapir._`): | ||
|
||
* `auth.apiKey(anotherInput)`: wraps any other input and designates it as an api key. The input is typically a header | ||
or a query parameter | ||
* `auth.basic: EndpointInput[UsernamePassword]`: maps to the base64-encoded username/password pair in the | ||
`Authorization` header | ||
* `auth.bearer: EndpointInput[String]`: maps to `Bearer [token]` in the `Authorization` header | ||
|
||
Multiple authentication inputs indicate that all of the given authentication values should be provided. Specifying | ||
alternative authentication methods (where only one value out of many needs to be provided) is currently not supported. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters