-
Notifications
You must be signed in to change notification settings - Fork 8
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
56 - Add use cases to get the current authenticated user and log out #57
Conversation
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.
@GPortas this PR seems to have changes from the recent refactoring? Maybe we need a fresh one?
I have refreshed the branch with the latest develop changes. Thanks! @pdurbin |
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.
Overall this looks fine. I'm interested in testing this but ideally all three pull requests would be near final before we do so. The one for Dataverse proper is still being discussed.
I did npm run test
and everything passed including tests like "logout".
VS Code is complaining about a line in a test. Not a big deal but it would be nice to not see red:
authRepositoryStub.logout = sandbox.stub().throwsException(testWriteError); | ||
const sut = new Logout(authRepositoryStub); | ||
|
||
let actualError: WriteError = undefined; |
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.
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.
Approved. I've been been testing this with the frontend and backend PRs.
Please note that until we address this issue... ... I am taking on faith that the js-dataverse code (this repo) is the same as the tarball that has been put into the frontend PR. For more discussion: |
What this PR does / why we need it:
Adds the following use cases to the package:
Both operations work given an auth cookie that comes from the JSF UI. It is the only auth mechanism added for the moment to support the SPA MVP. There is a TODO comment, in the ApiRepository file, providing more information and next steps on this.
Which issue(s) this PR closes:
Special notes for your reviewer:
This PR is part of an end-to-end flow that covers three PRs from three different repositories:
Suggestions on how to test this:
Test the end-to-end flow following the frontend repository PR instructions:
Is there a release notes update needed for this change?:
N/A
Additional documentation:
N/A