-
Couldn't load subscription status.
- Fork 79
Plugins oauth2 #1584
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
Merged
Merged
Plugins oauth2 #1584
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
cb99e04
Merge branch 'artifact' of https://github.com/biocore/qiita into oauth2
josenavas e8169f3
Merge branch 'oauth2' of https://github.com/squirrelo/qiita into oauth2
josenavas 1004130
Merge branch 'artifact' of https://github.com/biocore/qiita into oauth2
josenavas 2aa5876
Merge branch 'artifact' of https://github.com/biocore/qiita into arti…
josenavas f963137
Merge branch 'oauth2' into artifact-oauth
josenavas 100b354
Fixing the qiita client to use OAuth2
josenavas be34c7c
Fixing plugin tests
josenavas 3a305d8
Adding python patch to create the target gene client oauth2 info
josenavas b9d6931
Merge branch 'artifact' of https://github.com/biocore/qiita into arti…
josenavas 12dab96
Fixing conflicts
josenavas dbccfca
Fixing failing tests
josenavas 1c4ea5b
Addressing comments
josenavas e474219
Adding relation table between software and oauth identifiers
josenavas 1b2bdbc
Adding plugin information to the qiita-test-install script
josenavas c6eebfb
Fixing comments
josenavas 64e0713
Fixing expire time
josenavas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,18 @@ | ||
| -- Dec 5, 2015 | ||
| -- Adds table needed for oauth2 authentication | ||
|
|
||
| CREATE TABLE qiita.oauth_identifiers ( | ||
| CREATE TABLE qiita.oauth_identifiers ( | ||
| client_id varchar(50) NOT NULL, | ||
| client_secret varchar(255), | ||
| CONSTRAINT pk_oauth2 PRIMARY KEY ( client_id ) | ||
| ); | ||
| ); | ||
|
|
||
| CREATE TABLE qiita.oauth_software ( | ||
| software_id bigint NOT NULL, | ||
| client_id varchar NOT NULL, | ||
| CONSTRAINT idx_oauth_software PRIMARY KEY ( software_id, client_id ) | ||
| ) ; | ||
| CREATE INDEX idx_oauth_software_software ON qiita.oauth_software ( software_id ) ; | ||
| CREATE INDEX idx_oauth_software_client ON qiita.oauth_software ( client_id ) ; | ||
| ALTER TABLE qiita.oauth_software ADD CONSTRAINT fk_oauth_software_software FOREIGN KEY ( software_id ) REFERENCES qiita.software( software_id ) ; | ||
| ALTER TABLE qiita.oauth_software ADD CONSTRAINT fk_oauth_software FOREIGN KEY ( client_id ) REFERENCES qiita.oauth_identifiers( client_id ) ; |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| from random import SystemRandom | ||
| from string import ascii_letters, digits | ||
|
|
||
| from qiita_db.sql_connection import TRN | ||
|
|
||
| pool = ascii_letters + digits | ||
| client_id = ''.join([SystemRandom().choice(pool) for _ in range(50)]) | ||
| client_secret = ''.join([SystemRandom().choice(pool) for _ in range(255)]) | ||
|
|
||
| with TRN: | ||
| sql = """INSERT INTO qiita.oauth_identifiers (client_id, client_secret) | ||
| VALUES (%s, %s)""" | ||
| TRN.add(sql, [client_id, client_secret]) | ||
|
|
||
| sql = """INSERT INTO qiita.oauth_software (software_id, client_id) | ||
| VALUES (%s, %s)""" | ||
| TRN.add(sql, [1, client_id]) | ||
| TRN.execute() |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is duplicated from setUp
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.
I can't remove this one - tests fail. The other 2, however, have been removed.