Skip to content

Commit 7977c2f

Browse files
committed
Changes for v1.9.0
1 parent 91db950 commit 7977c2f

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
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.8.1
1+
# cordova-plugin-oracle-idm-auth 1.9.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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Release Notes
2-
2+
## 1.9.0 (20 Sep, 2022)
3+
* Handling the error scenario for Local Authentication initialization.
34
## 1.8.1 (7 Mar, 2022)
45
* Suppressing the error thrown over iOS platform on click of DONE button in safari browser over remote authentication flow.
56

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.8.1",
3+
"version": "1.9.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.8.1">
9+
version="1.9.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/IdmAuthenticationPlugin.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ public class IdmAuthenticationPlugin extends CordovaPlugin
3535
@Override
3636
public void initialize(CordovaInterface cordova, CordovaWebView webView) {
3737
super.initialize(cordova, webView);
38-
_localAuth = new LocalAuthentication(cordova.getActivity());
3938
ResourceHelper.INSTANCE.init(cordova.getActivity().getResources(), cordova.getActivity().getPackageName());
4039
}
4140

@@ -50,6 +49,16 @@ public void initialize(CordovaInterface cordova, CordovaWebView webView) {
5049
@Override
5150
public boolean execute(String action, JSONArray args, CallbackContext callbackContext)
5251
{
52+
try {
53+
if(_localAuth == null) {
54+
_localAuth = new LocalAuthentication(cordova.getActivity());
55+
}
56+
}
57+
catch (Exception e) {
58+
Log.e(TAG, "Error while enabling authenticator: " + e.getMessage(), e);
59+
IdmAuthenticationPlugin.invokeCallbackError(callbackContext, PluginErrorCodes.INTERNAL_ERROR);
60+
}
61+
5362
if ("setup".equals(action))
5463
{
5564
_handleSetup(args, callbackContext);

0 commit comments

Comments
 (0)