Skip to content

Commit

Permalink
AWS SDK for Android 2.6.28
Browse files Browse the repository at this point in the history
  • Loading branch information
AWS committed Aug 17, 2018
1 parent 4447929 commit 2cb4d84
Show file tree
Hide file tree
Showing 184 changed files with 8,799 additions and 1,749 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Change Log - AWS SDK for Android

## [Release 2.6.28](https://github.com/aws/aws-sdk-android/releases/tag/release_v2.6.28)

### Bug Fixes

* **Amazon Cognito Auth**
* Fix an issue where `getAppWebDomain` was used instead of `getAppId` which caused the SDK to return isAuthenticated as false for a logged in user. See [issue #508](https://github.com/aws/aws-sdk-android/issues/508)
* Added identity provider as parameter to the CognitoAuth builder to allow developers to launch hosted UI directly to a certain social provider. See [issue ##494](https://github.com/aws/aws-sdk-android/issues/494) and [issue ##230](https://github.com/awslabs/aws-sdk-android-samples/issues/230)

### Misc. Updates

* Model updates for the following services
* Amazon CloudWatch Logs
* Amazon DynamoDB
* Amazon KMS
* Amazon Pinpoint
* Amazon Transcribe

## [Release 2.6.27](https://github.com/aws/aws-sdk-android/releases/tag/release_v2.6.27)

### New Features
Expand Down
4 changes: 2 additions & 2 deletions aws-android-sdk-apigateway-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-pom</artifactId>
<version>2.6.27</version>
<version>2.6.28</version>
</parent>

<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-core</artifactId>
<optional>false</optional>
<version>2.6.27</version>
<version>2.6.28</version>
</dependency>
</dependencies>

Expand Down
4 changes: 2 additions & 2 deletions aws-android-sdk-auth-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-pom</artifactId>
<version>2.6.27</version>
<version>2.6.28</version>
</parent>

<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-core</artifactId>
<optional>false</optional>
<version>2.6.27</version>
<version>2.6.28</version>
</dependency>

<dependency>
Expand Down
4 changes: 2 additions & 2 deletions aws-android-sdk-auth-facebook/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-pom</artifactId>
<version>2.6.27</version>
<version>2.6.28</version>
</parent>

<repositories>
Expand All @@ -36,7 +36,7 @@
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-auth-core</artifactId>
<optional>false</optional>
<version>2.6.27</version>
<version>2.6.28</version>
<type>aar</type>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions aws-android-sdk-auth-google/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-pom</artifactId>
<version>2.6.27</version>
<version>2.6.28</version>
</parent>

<repositories>
Expand All @@ -40,7 +40,7 @@
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-auth-core</artifactId>
<optional>false</optional>
<version>2.6.27</version>
<version>2.6.28</version>
<type>aar</type>
</dependency>

Expand Down
10 changes: 5 additions & 5 deletions aws-android-sdk-auth-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-pom</artifactId>
<version>2.6.27</version>
<version>2.6.28</version>
</parent>

<repositories>
Expand All @@ -36,28 +36,28 @@
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-auth-core</artifactId>
<optional>false</optional>
<version>2.6.27</version>
<version>2.6.28</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-auth-google</artifactId>
<optional>true</optional>
<version>2.6.27</version>
<version>2.6.28</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-auth-facebook</artifactId>
<optional>true</optional>
<version>2.6.27</version>
<version>2.6.28</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-auth-userpools</artifactId>
<optional>true</optional>
<version>2.6.27</version>
<version>2.6.28</version>
<type>aar</type>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class SignInView extends LinearLayout {
private static final int IMAGE_LAYOUT_MARGINS = dp(10);

/** String that represents the SDK Version. */
private static final String SDK_VERSION = "2.6.27";
private static final String SDK_VERSION = "2.6.28";

/** Common Prefix of the namespaces of different SignIn providers. */
private static final String NAMESPACE_COMMON_PREFIX = "com.amazonaws.mobile.auth";
Expand Down
6 changes: 3 additions & 3 deletions aws-android-sdk-auth-userpools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-pom</artifactId>
<version>2.6.27</version>
<version>2.6.28</version>
</parent>

<repositories>
Expand All @@ -36,14 +36,14 @@
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-cognitoidentityprovider</artifactId>
<optional>false</optional>
<version>2.6.27</version>
<version>2.6.28</version>
</dependency>

<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-auth-core</artifactId>
<optional>false</optional>
<version>2.6.27</version>
<version>2.6.28</version>
<type>aar</type>
</dependency>

Expand Down
4 changes: 2 additions & 2 deletions aws-android-sdk-autoscaling/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-pom</artifactId>
<version>2.6.27</version>
<version>2.6.28</version>
</parent>

<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-core</artifactId>
<optional>false</optional>
<version>2.6.27</version>
<version>2.6.28</version>
</dependency>
</dependencies>

Expand Down
4 changes: 2 additions & 2 deletions aws-android-sdk-cloudwatch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-pom</artifactId>
<version>2.6.27</version>
<version>2.6.28</version>
</parent>

<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-core</artifactId>
<optional>false</optional>
<version>2.6.27</version>
<version>2.6.28</version>
</dependency>
</dependencies>

Expand Down
6 changes: 3 additions & 3 deletions aws-android-sdk-cognito/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<artifactId>aws-android-sdk-cognito</artifactId>
<packaging>jar</packaging>
<name>AWS SDK for Android - Amazon Cognito Sync</name>
<version>2.6.27</version>
<version>2.6.28</version>
<description>The AWS Android SDK for Amazon Cognito Sync module holds the client classes that are used for communicating with Amazon Cognito Sync Service</description>
<url>http://aws.amazon.com/sdkforandroid</url>

<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-pom</artifactId>
<version>2.6.27</version>
<version>2.6.28</version>
</parent>

<licenses>
Expand All @@ -29,7 +29,7 @@
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-core</artifactId>
<optional>false</optional>
<version>2.6.27</version>
<version>2.6.28</version>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
fabric-identifier=com.amazonaws.aws-android-sdk-cognito
fabric-version=2.6.27
fabric-version=2.6.28
fabric-build-type=binary
4 changes: 2 additions & 2 deletions aws-android-sdk-cognitoauth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<artifactId>aws-android-sdk-cognitoauth</artifactId>
<packaging>aar</packaging>
<name>AWS SDK for Android - Amazon Cognito Auth</name>
<version>2.6.27</version>
<version>2.6.28</version>
<description>The AWS Android SDK with app integration for Amazon Cognito Your User Pools Service</description>
<url>http://aws.amazon.com/sdkforandroid</url>

<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-android-sdk-pom</artifactId>
<version>2.6.27</version>
<version>2.6.28</version>
</parent>

<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ public final class Auth {
*/
private final String userPoolId;

/**
* Identity Provider for social login
*/
private final String identityProvider;

/**
* This identifies the settings for additional userPool features.
*/
Expand Down Expand Up @@ -131,7 +136,8 @@ private Auth(final Context context,
final String signOutRedirectUri,
final Set<String> scopes,
final AuthHandler userHandler,
final boolean advancedSecurityDataCollectionFlag) {
final boolean advancedSecurityDataCollectionFlag,
final String identityProvider) {
this.context = context;
this.appWebDomain = appWebDomain;
this.appId = appId;
Expand All @@ -144,6 +150,7 @@ private Auth(final Context context,
this.user.setUserHandler(userHandler);
this.userPoolId = userPoolId;
this.advancedSecurityDataCollectionFlag = advancedSecurityDataCollectionFlag;
this.identityProvider = identityProvider;
getCurrentUser();
}

Expand Down Expand Up @@ -198,6 +205,11 @@ public static final class Builder {
*/
private String mUserPoolId;

/**
* Identity Provider for the userPool.
*/
private String mIdentityProvider;

/**
* Flag indicating if data collection for advanced security mode is enabled.
* By default this is enabled.
Expand Down Expand Up @@ -347,6 +359,20 @@ public Builder setAuthHandler(final AuthHandler mUserHandler) {
return this;
}

/**
* Sets the identity provider. This will change the hosted UI behavior to go directly to the specified social provider
* <p>
* Optional. Set identity provider for social sign in.
* </p>
* @param mIdentityProvider Required: Scopes as a {@link Set<String>}.
* @return A reference to this builder.
*/
@SuppressWarnings("checkstyle:hiddenfield")
public Builder setIdentityProvider(final String mIdentityProvider) {
this.mIdentityProvider = mIdentityProvider;
return this;
}

/**
* Instantiates {@link Auth} with the set options.
* @return {@link Auth}.
Expand All @@ -362,9 +388,11 @@ public Auth build() {
this.mSignOutRedirect,
this.mScopes,
this.mUserHandler,
this.mAdvancedSecurityDataCollectionFlag);
this.mAdvancedSecurityDataCollectionFlag,
this.mIdentityProvider);
}


/**
* Checks if all required parameters are available to instantiate {@link Auth}.
*/
Expand Down Expand Up @@ -489,6 +517,13 @@ public String getSignOutRedirectUri() {
return signOutRedirectUri;
}

/**
* @return Identity Provider set for this {@link Auth} instance.
*/
public String getIdentityProvider() {
return identityProvider;
}

/**
* Use this method to get tokens for a user, the tokens are returned though the callback.
* {@link AuthHandler#onSuccess(AuthUserSession)}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import android.support.customtabs.CustomTabsIntent;
import android.support.customtabs.CustomTabsServiceConnection;
import android.support.customtabs.CustomTabsSession;
import android.text.TextUtils;
import android.util.Log;

import com.amazonaws.cognito.clientcontext.data.UserContextDataProvider;
Expand Down Expand Up @@ -204,7 +205,7 @@ public void signOut() {
@SuppressWarnings("checkstyle:hiddenfield")
public boolean isAuthenticated() {
AuthUserSession session =
LocalDataManager.getCachedSession(context, pool.getAppWebDomain(), userId, pool.getScopes());
LocalDataManager.getCachedSession(context, pool.getAppId(), userId, pool.getScopes());
return session.isValidForThreshold();
}

Expand Down Expand Up @@ -478,6 +479,11 @@ private void launchCognitoAuth(final String redirectUri, final Set<String> token
.appendQueryParameter(ClientConstants.DOMAIN_QUERY_PARAM_STATE, state)
.appendQueryParameter(ClientConstants.DOMAIN_QUERY_PARAM_USERCONTEXTDATA, getUserContextData());;

//check if identity provider set as param.
if (!TextUtils.isEmpty(pool.getIdentityProvider())) {
builder.appendQueryParameter(ClientConstants.DOMAIN_QUERY_PARAM_IDENTITY_PROVIDER, pool.getIdentityProvider());
}

// Convert scopes into a string of comma separated values.
final int noOfScopes = tokenScopes.size();
if (noOfScopes > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public abstract class ClientConstants {
public static final String DOMAIN_QUERY_PARAM_SCOPES = "scope";
public static final String DOMAIN_QUERY_PARAM_STATE = "state";
public static final String DOMAIN_QUERY_PARAM_USERCONTEXTDATA = "userContextData";
public static final String DOMAIN_QUERY_PARAM_IDENTITY_PROVIDER = "identity_provider";
public static final String DOMAIN_SCHEME = "https";
public static final String SESSION_TYPE_JWT = "JWT";
public static final String TOKEN_AUTH_TYPE_CODE = "code";
Expand Down
Loading

0 comments on commit 2cb4d84

Please sign in to comment.