Skip to content
This repository was archived by the owner on Mar 18, 2019. It is now read-only.

Commit 8cfad1d

Browse files
committed
Tweak docs
1 parent 704337e commit 8cfad1d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/api-guide/auth.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Authentication instances are responsible for handling the network authentication
66

77
Typically, you'll provide authentication configuration by passing an authentication instance to the client.
88

9-
import coreapi
9+
import coreapi
1010

1111
auth = coreapi.auth.BasicAuthentication(username='...', password='...')
1212
coreapi.Client(auth=auth)
@@ -43,18 +43,18 @@ Uses [HTTP Basic Authentication][basic-auth].
4343

4444
Uses [HTTP Bearer token authentication][bearer-auth], and can be used for OAuth 2, JWT, and custom token authentication schemes.
4545

46-
Outgoing requests will include the provided token in the request`Authorization` headers, in the following format:
46+
Outgoing requests will include the provided token in the request `Authorization` headers, in the following format:
4747

4848
Authorization: Bearer xxxx-xxxxxxxx-xxxx
4949

50-
The prefix may be customized if required, in order to support HTTP authentication schemes that are not [officially registered][http-auth-schemes].
50+
The scheme name may be customized if required, in order to support HTTP authentication schemes that are not [officially registered][http-auth-schemes].
5151

5252
A typical authentication flow using `TokenAuthentication` would be:
5353

5454
* Using an unauthenticated client make a request providing the users credentials to an endpoint to that returns an API token.
5555
* Instantiate an authenticated client using the returned token, and use this for all future requests.
5656

57-
**Signature**: `TokenAuthentication(token, prefix='Bearer', domain='*')`
57+
**Signature**: `TokenAuthentication(token, scheme='Bearer', domain='*')`
5858

5959
### SessionAuthentication
6060

@@ -81,4 +81,4 @@ Custom authentication classes may be created by subclassing `requests.AuthBase`,
8181

8282
[basic-auth]: https://tools.ietf.org/html/rfc7617
8383
[bearer-auth]: https://tools.ietf.org/html/rfc6750
84-
[http-auth-schemes]: https://www.iana.org/assignments/http-authschemes/
84+
[http-auth-schemes]: https://www.iana.org/assignments/http-authschemes/

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy