Skip to content

Commit 26d4977

Browse files
~api-clients documentation: installation code fix
1 parent 36cc8df commit 26d4977

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/topics/api-clients.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ The `SessionAuthentication` class allows session cookies to provide the user
419419
authentication. You'll want to provide a standard HTML login flow, to allow
420420
the user to login, and then instantiate a client using session authentication:
421421

422-
let auth = coreapi.auth.SessionAuthentication({
422+
let auth = new coreapi.auth.SessionAuthentication({
423423
csrfCookieName: 'csrftoken',
424424
csrfHeaderName: 'X-CSRFToken'
425425
})
@@ -433,7 +433,7 @@ requests for unsafe HTTP methods.
433433
The `TokenAuthentication` class can be used to support REST framework's built-in
434434
`TokenAuthentication`, as well as OAuth and JWT schemes.
435435

436-
let auth = coreapi.auth.TokenAuthentication({
436+
let auth = new coreapi.auth.TokenAuthentication({
437437
scheme: 'JWT'
438438
token: '<token>'
439439
})
@@ -471,7 +471,7 @@ For example, using the "Django REST framework JWT" package
471471

472472
The `BasicAuthentication` class can be used to support HTTP Basic Authentication.
473473

474-
let auth = coreapi.auth.BasicAuthentication({
474+
let auth = new coreapi.auth.BasicAuthentication({
475475
username: '<username>',
476476
password: '<password>'
477477
})

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