Skip to content
Merged
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
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Configure JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 18
java-version: 21

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v3

- name: Build
run: ./gradlew build :okta-oidc-android:test

- name: Upload Test Failures
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: test-failures
path: |
Expand Down
11 changes: 8 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.android.tools.build:gradle:8.11.1'
classpath 'org.owasp:dependency-check-gradle:5.3.2'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.25.2'
// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -27,6 +27,11 @@ allprojects {
// Insert local test repo here
google()
}
configurations.configureEach {
resolutionStrategy {
force "org.apache.commons:commons-lang3:3.18.0"
}
}

configurePublishing(it)
}
Expand Down Expand Up @@ -83,7 +88,7 @@ ext {

// Test dependency versions
junitVersion = '4.13.2'
mockitoVersion = "4.6.1"
mockitoVersion = "5.18.0"
robolectricVersion = '4.11'
truthVersion = '1.1.5'
okhttpVersion = '4.11.0'
Expand All @@ -97,7 +102,7 @@ ext {
securityVersion = "1.0.0"

// Gradle plugin version
checkstyleVersion = "10.25.0"
checkstyleVersion = "10.26.1"
}

tasks.register("showVersion") {
Expand Down
3 changes: 0 additions & 3 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,6 @@ See suppression.xml for individual files that skipped style checks.
<!-- Require Javadoc to have proper paragraph tags -->
<module name="JavadocParagraph"/>

<!-- Ensure Javadoc tag lines are indented appropriately -->
<module name="JavadocTagContinuationIndentation"/>
Comment on lines -394 to -395
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was failing for javadoc lines. so remove this.


<!-- At-clauses in Javadoc should not be empty -->
<module name="NonEmptyAtclauseDescription"/>

Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ POM_DEVELOPER_ID=okta
POM_DEVELOPER_NAME=Okta

VERSION_NAME=1.3.4
android.nonTransitiveRClass=false
android.defaults.buildfeatures.buildconfig=true
android.nonFinalResIds=false
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
41 changes: 28 additions & 13 deletions gradlew

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

15 changes: 9 additions & 6 deletions gradlew.bat

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

2 changes: 1 addition & 1 deletion library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ dependencies {
testImplementation "com.squareup.okhttp3:okhttp-tls:${rootProject.okhttpVersion}"
testImplementation "junit:junit:${rootProject.junitVersion}"
testImplementation "org.mockito:mockito-core:${rootProject.mockitoVersion}"
testImplementation "org.mockito:mockito-inline:${rootProject.mockitoVersion}"
testImplementation "org.mockito:mockito-inline:5.2.0"
testImplementation "org.robolectric:robolectric:${rootProject.robolectricVersion}"
testImplementation 'org.bouncycastle:bcprov-jdk18on:1.78.1'
testImplementation "com.google.truth:truth:${rootProject.truthVersion}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@

package com.okta.oidc.storage.security;

import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.security.KeyPairGeneratorSpec;
import android.util.Log;

Expand All @@ -33,7 +31,6 @@

import javax.security.auth.x500.X500Principal;

@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
class EncryptionManagerAPI18 extends BaseEncryptionManager {
private static final String TAG = EncryptionManagerAPI18.class.getSimpleName();
private static final int RSA_CALENDAR_MAX_YEARS = 100;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

package com.okta.oidc.storage.security;

import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.os.Build.VERSION;
Expand Down Expand Up @@ -43,7 +42,7 @@

import static android.security.keystore.KeyProperties.BLOCK_MODE_ECB;

@TargetApi(Build.VERSION_CODES.M)
@androidx.annotation.RequiresApi(Build.VERSION_CODES.M)
class EncryptionManagerAPI23 extends BaseEncryptionManager {
private static final String TAG = EncryptionManagerAPI23.class.getSimpleName();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

package com.okta.oidc.storage.security;

import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;

Expand All @@ -29,7 +28,7 @@
* A implementation of {@link EncryptionManager} which requires user authentication when
* using keys by OS. The private keys are locked in the key store.
*/
@TargetApi(Build.VERSION_CODES.M)
@androidx.annotation.RequiresApi(Build.VERSION_CODES.M)
public class GuardedEncryptionManager implements EncryptionManager {
private static final String KEY_STORE = "AndroidKeyStore";
private static final String KEY_AUTHORIZE_ALIAS = "smart_authorize_key_for_pin";
Expand Down Expand Up @@ -58,19 +57,13 @@ public GuardedEncryptionManager(Context context) {
*/
public GuardedEncryptionManager(Context context,
int userAuthenticationValidityDurationSeconds) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
mEncryptionManager = EncryptionManagerFactory
.createEncryptionManager(context,
KEY_STORE,
KEY_AUTHORIZE_ALIAS,
true,
(userAuthenticationValidityDurationSeconds > MIN_VALIDITY_DURATION)
? userAuthenticationValidityDurationSeconds
: MIN_VALIDITY_DURATION,
false);
} else {
throw new IllegalStateException("This class supports API23+");
}
mEncryptionManager = EncryptionManagerFactory
.createEncryptionManager(context,
KEY_STORE,
KEY_AUTHORIZE_ALIAS,
true,
Math.max(userAuthenticationValidityDurationSeconds, MIN_VALIDITY_DURATION),
false);
}

@Override
Expand Down
1 change: 0 additions & 1 deletion library/src/test/java/com/okta/oidc/util/UriUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ public void testFormUrlEncode_withSpaceSeparatedValueForParameter() {
parameters.put("test2", "value2 value3");
String query = UriUtil.formUrlEncode(parameters);

assertThat(query.contains("value2+value3"));
mSanitizer.parseQuery(query);
for (Map.Entry<String, String> param : parameters.entrySet()) {
assertThat(mSanitizer.getValue(param.getKey())).isEqualTo(param.getValue());
Expand Down
Loading