Skip to content
This repository was archived by the owner on Dec 12, 2018. It is now read-only.

Commit 7578eb0

Browse files
committed
Merge branch 'master' into AM-3581-social-login-v2
2 parents f2bddb2 + fc99244 commit 7578eb0

83 files changed

Lines changed: 1399 additions & 521 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

api/src/main/java/com/stormpath/sdk/provider/GoogleAccountRequestBuilder.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,4 @@
2222
*/
2323
public interface GoogleAccountRequestBuilder extends ProviderAccountRequestBuilder<GoogleAccountRequestBuilder> {
2424

25-
/**
26-
* Setter for the Google authorization code (it looks similar to "4/2Dz0r7r9oNBE9dFD-_JUb.suCu7uj8TEnp6UAPm0").
27-
*
28-
* @param code the Google authorization code.
29-
* @return the Google authorization code.
30-
*/
31-
GoogleAccountRequestBuilder setCode(String code);
32-
3325
}

api/src/main/java/com/stormpath/sdk/provider/GoogleProvider.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,9 @@
2222
*/
2323
public interface GoogleProvider extends RedirectableOAuthProvider {
2424

25+
String getHd();
26+
27+
GoogleProviderDisplay getDisplay();
28+
29+
GoogleProviderAccessType getAccessType();
2530
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.stormpath.sdk.provider;
2+
3+
/**
4+
* A GoogleProviderAccessType represents the different available options for access_type when initiating
5+
* OAuth flow with Google. See
6+
* <a href="https://developers.google.com/identity/protocols/OAuth2WebServer#offline">Google's documentation</a> for details.
7+
*
8+
* @since 1.2.0
9+
*/
10+
public enum GoogleProviderAccessType {
11+
OFFLINE, ONLINE
12+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.stormpath.sdk.provider;
2+
3+
/**
4+
* A value specifying how the authorization server displays the authentication and consent user interface pages. These
5+
* values are specified, and accepted by the Google servers, but do not have any effect on its behavior
6+
*
7+
* @since 1.2.0
8+
*/
9+
public enum GoogleProviderDisplay {
10+
PAGE, POPUP, TOUCH, WAP
11+
}

api/src/main/java/com/stormpath/sdk/provider/LinkedInAccountRequestBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
public interface LinkedInAccountRequestBuilder extends ProviderAccountRequestBuilder<LinkedInAccountRequestBuilder> {
2424

2525
/**
26-
* Setter for the LinkedIn authorization code (it looks similar to "4/2Dz0r7r9oNBE9dFD-_JUb.suCu7uj8TEnp6UAPm0").
26+
* Setter for the LinkedIn authorization code.
2727
*
2828
* @param code the LinkedIn authorization code.
2929
* @return the LinkedIn authorization code.

api/src/main/java/com/stormpath/sdk/provider/OAuthProvider.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
package com.stormpath.sdk.provider;
1717

18+
import java.util.List;
19+
1820
/**
1921
* @since 1.0.0
2022
*/
@@ -33,4 +35,11 @@ public interface OAuthProvider extends Provider {
3335
* @return the client secret used to authenticate requests to the 3rd party oauth provider.
3436
*/
3537
String getClientSecret();
38+
39+
/**
40+
* Returns the list of scopes configured for the oauth provider
41+
* @return the list of scopes configured for the oauth provider
42+
* @since 1.2.0
43+
*/
44+
List<String> getScope();
3645
}

api/src/main/java/com/stormpath/sdk/provider/ProviderAccountRequest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* NOTE: A Provider-specific {@link com.stormpath.sdk.directory.Directory} must previously exist in Stormpath and it must also
2222
* be an Enabled Account Store within the Application.
2323
*
24-
* @see {@link com.stormpath.sdk.directory.CreateDirectoryRequestBuilder}
24+
* @see com.stormpath.sdk.directory.CreateDirectoryRequestBuilder
2525
* @since 1.0.beta
2626
*/
2727
public interface ProviderAccountRequest {
@@ -32,4 +32,6 @@ public interface ProviderAccountRequest {
3232
* @return the {@link ProviderData} Resource containing the data required to access to the account.
3333
*/
3434
ProviderData getProviderData();
35+
36+
String getRedirectUri();
3537
}

api/src/main/java/com/stormpath/sdk/provider/ProviderAccountRequestBuilder.java

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,36 @@
1919
* A Builder to construct {@link ProviderAccountRequest}s.
2020
*
2121
* @param <T> the specific builder class (e.g {@link FacebookAccountRequestBuilder} or {@link GoogleAccountRequestBuilder}.
22-
*
2322
* @since 1.0.beta
2423
*/
2524
public interface ProviderAccountRequestBuilder<T extends ProviderAccountRequestBuilder<T>> {
2625

2726
/**
28-
* Setter for the Provider App authorization code.
27+
* Setter for the Provider App access token.
2928
*
30-
* @param accessToken the Provider App authorization code.
29+
* @param accessToken the Provider App access token.
3130
* @return the builder instance for method chaining.
3231
*/
3332
T setAccessToken(String accessToken);
3433

34+
/**
35+
* Setter for the Provider App authorization code.
36+
*
37+
* @param code the Provider App authorization code.
38+
* @return the builder instance for method chaining.
39+
* @since 1.2.0
40+
*/
41+
T setCode(String code);
42+
43+
/**
44+
* Setter for the uri to use when validating the authorization code.
45+
*
46+
* @param redirectUri the uri to use when validating the authorization code.
47+
* @return the builder instance for method chaining.
48+
* @since 1.2.0
49+
*/
50+
T setRedirectUri(String redirectUri);
51+
3552
/**
3653
* Creates a new {@code ProviderAccountRequest} instance based on the current builder state.
3754
*

ci/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ source ./ci/common.sh
44

55
if [ -n "$RUN_ITS" ]; then
66
info "Running unit and IT tests..."
7-
(mvn -Pclover.all -DskipITs=false -q install &> $WORKDIR/target/tests.log) &
7+
(mvn -s ci/settings.xml -Pclover.all -DskipITs=false -q install &> $WORKDIR/target/tests.log) &
88
PID=$!
99
show_spinner "$PID"
1010

@@ -20,7 +20,7 @@ fi
2020

2121
if [ -z "$RUN_ITS" ]; then
2222
info "Running unit tests..."
23-
(mvn -q install &> $WORKDIR/target/tests.log) &
23+
(mvn -s ci/settings.xml -q install &> $WORKDIR/target/tests.log) &
2424
PID=$!
2525
show_spinner "$PID"
2626

ci/build_docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if [ "$EXIT_CODE" -ne 0 ]; then
2222
fi
2323

2424
info "Generating JavaDocs..."
25-
(mvn -q javadoc:aggregate -P travis-docs &> $WORKDIR/target/javadocs.log) &
25+
(mvn -s ci/settings.xml -q javadoc:aggregate -P travis-docs &> $WORKDIR/target/javadocs.log) &
2626
PID=$!
2727

2828
show_spinner "$PID"

0 commit comments

Comments
 (0)