Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
compileSdkVersion 25
buildToolsVersion '25.0.3'

defaultConfig {
applicationId "com.pingidentity.developer.android_appauth_sample_application"
minSdkVersion 16
targetSdkVersion 23
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
Expand All @@ -19,10 +19,12 @@ android {
}
}

android.defaultConfig.manifestPlaceholders = ['appAuthRedirectScheme': 'com.pingidentity.developer.appauth']

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:design:23.2.0'
compile project(':library')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'net.openid:appauth:0.7.0'
}
5 changes: 3 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
package="com.pingidentity.developer.android_appauth_sample_application">

<application
android:allowBackup="true"
android:allowBackup="false"
android:fullBackupContent="false"
android:icon="@mipmap/ping_logo"
android:label="@string/app_name"
android:supportsRtl="true"
android:supportsRtl="false"
android:theme="@style/AppTheme">

<!-- Callback from authentication screen -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import net.openid.appauth.AuthorizationServiceConfiguration;
import net.openid.appauth.AuthorizationServiceDiscovery;
import net.openid.appauth.CodeVerifierUtil;
import net.openid.appauth.ResponseTypeValues;
import net.openid.appauth.TokenRequest;
import net.openid.appauth.TokenResponse;

Expand Down Expand Up @@ -90,7 +91,7 @@ protected void onCreate(Bundle savedInstanceState) {
if (savedInstanceState != null) {
if (savedInstanceState.containsKey(KEY_AUTH_STATE)) {
try {
mAuthState = AuthState.fromJson(savedInstanceState.getString(KEY_AUTH_STATE));
mAuthState = AuthState.jsonDeserialize(savedInstanceState.getString(KEY_AUTH_STATE));
} catch (JSONException ex) {
Log.e(TAG, "Malformed authorization JSON saved", ex);
}
Expand Down Expand Up @@ -301,7 +302,7 @@ private void authorize(AuthorizationServiceConfiguration authServiceConfiguratio
AuthorizationRequest authRequest = new AuthorizationRequest.Builder(
authServiceConfiguration,
OIDC_CLIENT_ID,
AuthorizationRequest.RESPONSE_TYPE_CODE,
ResponseTypeValues.CODE,
Uri.parse(OIDC_REDIRECT_URI))
.setScope(OIDC_SCOPE)
.setCodeVerifier(codeVerifier, codeVerifier, "plain")
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0-beta5'
classpath 'com.android.tools.build:gradle:2.3.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Dec 28 10:00:20 PST 2015
#Fri Aug 25 19:35:25 EDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include ':app', ':library'
include ':app'