Skip to content

Commit 1c4d277

Browse files
authored
Merge pull request #5362 from ashishnitinpatil/master
~api-clients documentation: installation code fix
2 parents 36cc8df + 26d4977 commit 1c4d277

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)