Skip to content

Commit 504931a

Browse files
committed
Changes for v1.7.0
1 parent ee6157d commit 504931a

File tree

5 files changed

+16
-3
lines changed

5 files changed

+16
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# cordova-plugin-oracle-idm-auth 1.6.0
1+
# cordova-plugin-oracle-idm-auth 1.7.0
22

33
## About the cordova-plugin-oracle-idm-auth
44
The plugin provides authentication and authorization functionality for cordova based mobile applications,

RELEASENOTES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Release Notes
22

3+
## 1.7.0 (13 Dec, 2021)
4+
* Support for client certificate authentication flow.
5+
36
## 1.6.0 (23 Oct, 2020)
47
* Support for two legged flow - FedAuth followed by a Basic Auth with native prompt.
58

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cordova-plugin-oracle-idm-auth",
3-
"version": "1.6.0",
3+
"version": "1.7.0",
44
"description": "Provides authentication and authorization functionality using the Oracle IDM SDK, supporting standard protocols like Basic Auth, OAUTH, OpenID Connect and WebSSO.",
55
"cordova": {
66
"id": "cordova-plugin-oracle-idm-auth",

plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
77
xmlns:android="http://schemas.android.com/apk/res/android"
88
id="cordova-plugin-oracle-idm-auth"
9-
version="1.6.0">
9+
version="1.7.0">
1010
<name>cordova-plugin-oracle-idm-auth</name>
1111
<description>Provides authentication and authorization functionality using the Oracle IDM SDK, supporting standard protocols like Basic Auth, OAUTH, OpenID Connect and WebSSO</description>
1212
<keywords>cordova,idm,authentication,auth</keywords>

src/android/src/oracle/idm/auth/plugin/IdmAuthentication.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import oracle.idm.mobile.auth.logout.OMLogoutCompletionHandler;
3434
import oracle.idm.mobile.callback.OMAuthenticationContextCallback;
3535
import oracle.idm.mobile.callback.OMMobileSecurityServiceCallback;
36+
import oracle.idm.mobile.certificate.ClientCertificatePreference;
3637
import oracle.idm.mobile.configuration.OMMobileSecurityConfiguration;
3738

3839
import org.apache.cordova.CallbackContext;
@@ -443,6 +444,9 @@ public CHALLENGE_TYPE getChallengeType()
443444
_finishWebView();
444445
IdmAuthenticationPlugin.invokeCallbackError(_loginCallback, PluginErrorCodes.UNTRUSTED_CHALLENGE);
445446
break;
447+
case CLIENT_IDENTITY_CERTIFICATE_REQUIRED:
448+
handleClientCertificateChallenge(fields);
449+
break;
446450
default:
447451
Log.w(TAG, "Unhandled challenge type encountered: " + _challengeType);
448452
IdmAuthenticationPlugin.invokeCallbackError(_loginCallback, PluginErrorCodes.UNSUPPORTED_CHALLENGE);
@@ -490,6 +494,12 @@ else if (challenge.getChallengeType() == OMAuthenticationChallengeType.EXTERNAL_
490494
}
491495
}
492496

497+
private void handleClientCertificateChallenge(Map<String, Object> fields) {
498+
fields.put(OMSecurityConstants.Challenge.CLIENT_CERTIFICATE_ALIAS_KEY, "OMDefaultAuthenticator_default_key");
499+
fields.put(OMSecurityConstants.Challenge.CLIENT_CERTIFICATE_STORAGE_PREFERENCE_KEY, ClientCertificatePreference.Storage.APP_LEVEL_ANDROID_KEYSTORE);
500+
_completionHandler.proceed(fields);
501+
}
502+
493503
private void handleExternalBrowserChallenge(Map<String, Object> fields) {
494504
bindChromeTabs();
495505
Uri externalBrowserURL = Uri.parse((String) fields.get(OMSecurityConstants.Challenge.EXTERNAL_BROWSER_LOAD_URL));

0 commit comments

Comments
 (0)