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
OAuth1 joining #608
Merged
Merged
OAuth1 joining #608
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
06ff2e4
OAuth2 joining
e4d7914
Merge
a362e88
Starting on OAuth 1
103e86a
Merge branch 'master' of https://github.com/google/data-transfer-proj…
7118929
Working on Google oauth
388a1d6
Solved sign-in and consent screen problem
200d1dc
Google and Instagram work, this is a good stopping point
f80acf8
Moved OAuth2 unified flow to libraries/auth, some minor cleanup and d…
4e0afd6
Nits
97c717d
Clarification
63e387a
Starting OAuth1 work, some OAuth2 cleanup
bd2e8a1
Trying OAuth1, adding some clarity
c192794
Flickr and SmugMug work!
0531520
Twitter works!
7884789
Merge
3ca3476
Some documentation
f0bc06e
Add notes about deprecation
4fcbde8
Update extensions/auth/portability-auth-flickr/src/main/java/org/data…
rtannenbaum f219837
Update extensions/auth/portability-auth-smugmug/src/main/java/org/dat…
rtannenbaum 8bb9306
Update extensions/auth/portability-auth-twitter/src/main/java/org/dat…
rtannenbaum b63b0b4
Update libraries/auth/src/main/java/org/datatransferproject/auth/OAut…
rtannenbaum a06c4aa
Adding some docs, removing scopes requirement
7286ebb
Decided to keep scopes required
36907af
Doc
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
65 changes: 65 additions & 0 deletions
65
...lity-auth-flickr/src/main/java/org/datatransferproject/auth/flickr/FlickrOAuthConfig.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
* Copyright 2018 The Data Transfer Project Authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.datatransferproject.auth.flickr; | ||
|
||
import com.google.api.client.auth.oauth.OAuthHmacSigner; | ||
import com.google.api.client.auth.oauth.OAuthSigner; | ||
import com.google.common.collect.ImmutableMap; | ||
import java.util.Map; | ||
import org.datatransferproject.auth.OAuth1Config; | ||
|
||
/** | ||
* Class that supplies Flickr-specific OAuth1 info | ||
* See https://www.flickr.com/services/api/auth.oauth.html | ||
*/ | ||
public class FlickrOAuthConfig implements OAuth1Config { | ||
|
||
@Override | ||
public String getServiceName() { | ||
return "Flickr"; | ||
} | ||
|
||
@Override | ||
public String getRequestTokenUrl() { | ||
return "https://www.flickr.com/services/oauth/request_token"; | ||
} | ||
|
||
@Override | ||
public String getAuthorizationUrl() { | ||
return "https://www.flickr.com/services/oauth/authorize"; | ||
} | ||
|
||
@Override | ||
public String getAccessTokenUrl() { | ||
return "https://www.flickr.com/services/oauth/access_token"; | ||
} | ||
|
||
@Override | ||
public Map<String, String> getExportScopes() { | ||
return ImmutableMap.of("PHOTOS", "read"); | ||
} | ||
|
||
@Override | ||
public Map<String, String> getImportScopes() { | ||
return ImmutableMap.of("PHOTOS", "write"); | ||
} | ||
|
||
@Override | ||
public String getScopeParameterName() { | ||
return "perms"; | ||
} | ||
} |
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
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
65 changes: 65 additions & 0 deletions
65
...y-auth-smugmug/src/main/java/org/datatransferproject/auth/smugmug/SmugMugOAuthConfig.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
* Copyright 2018 The Data Transfer Project Authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.datatransferproject.auth.smugmug; | ||
|
||
import com.google.api.client.auth.oauth.OAuthHmacSigner; | ||
import com.google.api.client.auth.oauth.OAuthSigner; | ||
import com.google.common.collect.ImmutableMap; | ||
import java.util.Map; | ||
import org.datatransferproject.auth.OAuth1Config; | ||
|
||
/** | ||
* Class that supplies SmugMug-specific OAuth1 info | ||
* See https://smugmug.atlassian.net/wiki/spaces/API/pages/689052/OAuth | ||
*/ | ||
public class SmugMugOAuthConfig implements OAuth1Config { | ||
|
||
@Override | ||
public String getServiceName() { | ||
return "SmugMug"; | ||
} | ||
|
||
@Override | ||
public String getRequestTokenUrl() { | ||
return "https://secure.smugmug.com/services/oauth/1.0a/getRequestToken"; | ||
} | ||
|
||
@Override | ||
public String getAuthorizationUrl() { | ||
return "https://secure.smugmug.com/services/oauth/1.0a/authorize"; | ||
} | ||
|
||
@Override | ||
public String getAccessTokenUrl() { | ||
return "https://secure.smugmug.com/services/oauth/1.0a/getAccessToken"; | ||
} | ||
|
||
@Override | ||
public Map<String, String> getExportScopes() { | ||
return ImmutableMap.of("PHOTOS", "Read"); | ||
} | ||
|
||
@Override | ||
public Map<String, String> getImportScopes() { | ||
return ImmutableMap.of("PHOTOS", "Add"); | ||
} | ||
|
||
@Override | ||
public String getScopeParameterName() { | ||
return "Permissions"; | ||
} | ||
} |
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
Oops, something went wrong.
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.
nit: class docs here & elsewhere
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.
Done.