-
Notifications
You must be signed in to change notification settings - Fork 16
Pass selected authToken TTL #268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass selected authToken TTL #268
Conversation
| assert.isBoolean(res.body.result.nextPage) | ||
|
|
||
| const resItem = res.body.result[0] | ||
| const resItem = res.body.result.res[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a fix not related to the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix getWeightedAveragesReport test case: 44cf79b
yes, it's stuck from the previous PR
this is not a significant fix, decided not to separate it into a separate PR
ezewer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
This PR adds ability to set the selected TTL of the bfx auth token
The flow:
authTokenTTLSecparam can be passed to specify the auth token TTL to override the default value 24h, available values between 24h and 7 dayssignUprequest{ "method": "signUp", "auth": { "authToken": "pub:api:12345678-1234-4321-5678-12ab3ba45ab6-caps:s:o:f:w:wd:a-write", "isNotProtected": true }, "params": { "authTokenTTLSec": 604800 } }signUpresponse:{ "jsonrpc": "2.0", "error": { "code": 400, "message": "Auth token TTL has been set to disallowed value", "data": null }, "id": null }signIncall, response example:{ "jsonrpc": "2.0", "result": { "email": "user@email.com", "isSubAccount": false, "token": "12345678-1234-4321-5678-a1b234567890", "shouldNotSyncOnStartupAfterUpdate": false, "authTokenTTLSec": 604800 }, "id": null }updateUserendpointupdateUserrequest{ "auth": { "token": "12345678-1234-4321-5678-a1b234567890" }, "method": "updateUser", "params": { "authTokenTTLSec": 601200 } }updateUserresponse{ "jsonrpc": "2.0", "result": true, "id": null }{ "jsonrpc": "2.0", "error": { "code": 400, "message": "Auth token TTL has been set to disallowed value", "data": null }, "id": null }Basic changes:
authTokenTTLSecon sign-upauthTokenTTLSecwhen sign-inauthTokenTTLSecfield byupdateUsermethodv34DB migrationgetWeightedAveragesReporttest case