-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't save token from authorization header (#2228)
When Dockstore API is invoked with a Google token, we look up the user based on the email associated with that token. If we don't find a user, we create one. Then we would save the token along with the user; this was done to use that token to authenticate subsequent API calls to SAM. Instead, don't persist the token to the database. Added a transient field to User to hold the token and when calls are made to SAM, check that field first. Not wild about changing the User class to not directly map to the database -- we don't use @transient anywhere else. But this seems to be the lowest impact way of implementing this.
- Loading branch information
Showing
4 changed files
with
42 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters