Skip to content
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

Client token writing is inconsistent #62

Open
TOFarmer opened this issue Feb 19, 2021 · 1 comment
Open

Client token writing is inconsistent #62

TOFarmer opened this issue Feb 19, 2021 · 1 comment
Labels
Bug Issues that report incorrect or undesirable behaviour(s) Priority: 2 NORMAL: A task which is not critical and should be addressed when there are no higher priority issue

Comments

@TOFarmer
Copy link
Contributor

Summary

If the SALClient authenticates by simply calling authenticate, the received token is assigned to SALClient.auth_token, but is not written to a file.
By contrast, if a SALClient which has not previously authenticated calls list of get then as well as authenticating, the token is written to a file.

Possible fixes

I think it would make sense to move the token writing (_write_auth_token) inside SALClient.authenticate and write the token by default using a write_token=True parameter. Then write_auth_token can be removed from _make_request, which already calls authenticate.

@TOFarmer TOFarmer added Bug Issues that report incorrect or undesirable behaviour(s) Priority: 2 NORMAL: A task which is not critical and should be addressed when there are no higher priority issue labels Feb 19, 2021
@TOFarmer
Copy link
Contributor Author

It would also be beneficial to add token writing tests after this issue has been addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that report incorrect or undesirable behaviour(s) Priority: 2 NORMAL: A task which is not critical and should be addressed when there are no higher priority issue
Projects
None yet
Development

No branches or pull requests

1 participant