Open dhicksNTIA opened 6 years ago
which JS client are you using?
e.g. with angular, there is a default mechanism that uses the cookie named XSRF-TOKEN
and sends it as a header named X-XSRF-TOKEN
(https://github.com/angular/angular/blob/master/packages/common/http/src/module.ts#L94 and https://github.com/angular/angular/blob/master/packages/common/http/src/xsrf.ts#L90)
Description
This is a question about using a CSRF cookie name/header name with the generated JS library.
Swagger-codegen version
2.2.1
Swagger declaration file content or url
Command line used for generation
java -jar ~/Downloads/swagger-codegen-cli-2.2.1.jar generate -l javascript -i ~/Downloads/schema.json -o ~/Documents/heathcliff/clients/javascript
Steps to reproduce
N/A
Related issues/PRs
Suggest a fix/enhancement
Okay, so to get a broader sense of what I am doing:
Question is: how can I tell the JS client to use a CSRF token. In COREAPI, i can do something like:
is there something similar with the generated JS code? Do i have to specify a security parameter in
settings.py
besidedbasic
?