File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -419,7 +419,7 @@ The `SessionAuthentication` class allows session cookies to provide the user
419
419
authentication. You'll want to provide a standard HTML login flow, to allow
420
420
the user to login, and then instantiate a client using session authentication:
421
421
422
- let auth = coreapi.auth.SessionAuthentication({
422
+ let auth = new coreapi.auth.SessionAuthentication({
423
423
csrfCookieName: 'csrftoken',
424
424
csrfHeaderName: 'X-CSRFToken'
425
425
})
@@ -433,7 +433,7 @@ requests for unsafe HTTP methods.
433
433
The ` TokenAuthentication ` class can be used to support REST framework's built-in
434
434
` TokenAuthentication ` , as well as OAuth and JWT schemes.
435
435
436
- let auth = coreapi.auth.TokenAuthentication({
436
+ let auth = new coreapi.auth.TokenAuthentication({
437
437
scheme: 'JWT'
438
438
token: '<token>'
439
439
})
@@ -471,7 +471,7 @@ For example, using the "Django REST framework JWT" package
471
471
472
472
The ` BasicAuthentication ` class can be used to support HTTP Basic Authentication.
473
473
474
- let auth = coreapi.auth.BasicAuthentication({
474
+ let auth = new coreapi.auth.BasicAuthentication({
475
475
username: '<username>',
476
476
password: '<password>'
477
477
})
You can’t perform that action at this time.
0 commit comments