Skip to content

Commit 43215b4

Browse files
committed
Changes for v2.2.0
1 parent 53add45 commit 43215b4

File tree

9 files changed

+45
-43
lines changed

9 files changed

+45
-43
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 2.1.1
1+
# cordova-plugin-oracle-idm-auth 2.2.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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Release Notes
2+
## 2.2.0 (29 July, 2024)
3+
* cordova-ios 7.0.3 related upgrade
24
## 2.1.1 (13 March, 2024)
35
* Documentation update
46
## 2.1.0 (25 July, 2023)

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": "2.1.1",
3+
"version": "2.2.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="2.1.1">
9+
version="2.2.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/ios/src/IdmAuthentication.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* The Universal Permissive License (UPL), Version 1.0
44
*/
55
#import <Foundation/Foundation.h>
6-
#import <Cordova/CDVCommandDelegateImpl.h>
6+
#import <Cordova/CDVCommandDelegate.h>
77
#import <Cordova/CDVPlugin.h>
88

99
#import "IDMMobileSDKv2Library.h"
@@ -19,26 +19,26 @@ NS_ASSUME_NONNULL_BEGIN
1919
-(nullable instancetype) initWithProperties:(NSDictionary<NSString *, NSObject *> *) properties
2020
baseViewController:(nonnull UIViewController *)baseVc
2121
callback:(void(^)(IdmAuthentication* authFlow, NSError* error))setupCompletion;
22-
- (void) startLogin: (CDVCommandDelegateImpl*) commandDelegate
22+
- (void) startLogin: (id<CDVCommandDelegate>) commandDelegate
2323
withCallbackId: (NSString*) callbackId;
24-
- (void) cancelLogin: (CDVCommandDelegateImpl*) commandDelegate
24+
- (void) cancelLogin: (id<CDVCommandDelegate>) commandDelegate
2525
withCallbackId: (NSString*) callbackId;
26-
- (void) finishLogin: (CDVCommandDelegateImpl*) commandDelegate
26+
- (void) finishLogin: (id<CDVCommandDelegate>) commandDelegate
2727
withCallbackId: (NSString*) callbackId
2828
challengeResult: (NSDictionary*) challengeFields;
29-
- (void) isAuthenticated: (CDVCommandDelegateImpl*) commandDelegate
29+
- (void) isAuthenticated: (id<CDVCommandDelegate>) commandDelegate
3030
withCallbackId: (NSString*) callbackId
3131
withProperties: (NSDictionary*) properties;
32-
- (void) getHeaders: (CDVCommandDelegateImpl*) commandDelegate
32+
- (void) getHeaders: (id<CDVCommandDelegate>) commandDelegate
3333
withCallbackId: (NSString*) callbackId
3434
withFedAuthSecuredUrl: (NSString*) fedAuthSecuredUrl
3535
withOauthScopes: (NSSet*) scopes;
36-
- (void) logout: (CDVCommandDelegateImpl*) commandDelegate
36+
- (void) logout: (id<CDVCommandDelegate>) commandDelegate
3737
withCallbackId: (NSString*) callbackId
3838
withForgetOption:(BOOL) forget;
39-
- (void) addTimeoutCallback: (CDVCommandDelegateImpl*) commandDelegate
39+
- (void) addTimeoutCallback: (id<CDVCommandDelegate>) commandDelegate
4040
withCallbackId: (NSString*) callbackId;
41-
- (void) resetIdleTimeout: (CDVCommandDelegateImpl*) commandDelegate
41+
- (void) resetIdleTimeout: (id<CDVCommandDelegate>) commandDelegate
4242
withCallbackId: (NSString*) callbackId;
4343
- (void) submitExternalBrowserChallengeResponse: (NSURL*) incomingUrl;
4444
@end

src/ios/src/IdmAuthentication.m

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ @interface IdmAuthentication()<SFSafariViewControllerDelegate>
5050
/**
5151
* Callback details for returning the result for login or logout to javascript layer.
5252
*/
53-
@property (nonatomic, strong, nullable) CDVCommandDelegateImpl* loginLogoutCommandDelegate;
53+
@property (nonatomic, strong, nullable) id<CDVCommandDelegate> loginLogoutCommandDelegate;
5454
@property (nonatomic, copy, nullable) NSString* loginLogoutCallbackId;
5555

5656
/**
5757
* Callback details for returning the result for timeout to javascript layer.
5858
*/
59-
@property (nonatomic, strong, nullable) CDVCommandDelegateImpl* timeoutCommandDelegate;
59+
@property (nonatomic, strong, nullable) id<CDVCommandDelegate> timeoutCommandDelegate;
6060
@property (nonatomic, copy, nullable) NSString* timeoutCallbackId;
6161

6262
/**
@@ -157,7 +157,7 @@ -(nullable instancetype) initWithProperties:(NSDictionary<NSString *, NSObject *
157157
* @param commandDelegate: callback
158158
* @param callbackId: callback id
159159
*/
160-
-(void) startLogin:(CDVCommandDelegateImpl*) commandDelegate
160+
-(void) startLogin:(id<CDVCommandDelegate>) commandDelegate
161161
withCallbackId: (NSString*) callbackId {
162162
IdmLog(@"startLogin invoked");
163163
NSError* error = [self.ommss startAuthenticationProcess:nil];
@@ -186,7 +186,7 @@ -(void) startLogin:(CDVCommandDelegateImpl*) commandDelegate
186186
* @param commandDelegate: callback
187187
* @param callbackId: callback id
188188
*/
189-
-(void) cancelLogin:(CDVCommandDelegateImpl*) commandDelegate
189+
-(void) cancelLogin:(id<CDVCommandDelegate>) commandDelegate
190190
withCallbackId: (NSString*) callbackId {
191191
IdmLog(@"cancelLogin invoked");
192192
self.loginLogoutCommandDelegate = commandDelegate;
@@ -203,7 +203,7 @@ -(void) cancelLogin:(CDVCommandDelegateImpl*) commandDelegate
203203
* @param callbackId: callback id
204204
* @param challengeFields: The filled up challenge fields map.
205205
*/
206-
-(void) finishLogin:(CDVCommandDelegateImpl *)commandDelegate
206+
-(void) finishLogin:(id<CDVCommandDelegate>)commandDelegate
207207
withCallbackId:(NSString *)callbackId
208208
challengeResult: (NSDictionary*) challengeFields {
209209
IdmLog(@"Finish login received %@", challengeFields);
@@ -228,7 +228,7 @@ -(void) finishLogin:(CDVCommandDelegateImpl *)commandDelegate
228228
* @param callbackId: callback id
229229
* @param properties: extra properties if any
230230
*/
231-
- (void) isAuthenticated: (CDVCommandDelegateImpl*) commandDelegate
231+
- (void) isAuthenticated: (id<CDVCommandDelegate>) commandDelegate
232232
withCallbackId: (NSString*) callbackId
233233
withProperties: (NSDictionary*) properties {
234234
IdmLog(@"isAuthenticated invoked");
@@ -277,7 +277,7 @@ - (BOOL) checkIsValidForOauth: (OMAuthenticationContext*) context
277277
* @param callbackId: callback id
278278
* @param fedAuthSecuredUrl: The secured URL for which cookies and headers have to be retrieved. Applicable only for Federated Auth usecase.
279279
*/
280-
- (void) getHeaders: (CDVCommandDelegateImpl*) commandDelegate
280+
- (void) getHeaders: (id<CDVCommandDelegate>) commandDelegate
281281
withCallbackId: (NSString*) callbackId
282282
withFedAuthSecuredUrl: (NSString*) fedAuthSecuredUrl
283283
withOauthScopes: (NSSet*) scopes{
@@ -318,7 +318,7 @@ - (void) getHeaders: (CDVCommandDelegateImpl*) commandDelegate
318318
* @param commandDelegate: callback
319319
* @param callbackId: callback id
320320
*/
321-
-(void) logout:(CDVCommandDelegateImpl *)commandDelegate
321+
-(void) logout:(id<CDVCommandDelegate>)commandDelegate
322322
withCallbackId:(NSString *)callbackId
323323
withForgetOption:(BOOL) forget {
324324
IdmLog(@"logout invoked with forget %@", forget ? @"YES": @"NO");
@@ -337,7 +337,7 @@ -(void) logout:(CDVCommandDelegateImpl *)commandDelegate
337337
* @param commandDelegate: callback
338338
* @param callbackId: callback id
339339
*/
340-
- (void) addTimeoutCallback: (CDVCommandDelegateImpl*) commandDelegate
340+
- (void) addTimeoutCallback: (id<CDVCommandDelegate>) commandDelegate
341341
withCallbackId: (NSString*) callbackId {
342342
IdmLog(@"addTimeoutCallback invoked");
343343
self.timeoutCommandDelegate = commandDelegate;
@@ -352,7 +352,7 @@ - (void) addTimeoutCallback: (CDVCommandDelegateImpl*) commandDelegate
352352
* @param commandDelegate: callback
353353
* @param callbackId: callback id
354354
*/
355-
- (void) resetIdleTimeout: (CDVCommandDelegateImpl*) commandDelegate
355+
- (void) resetIdleTimeout: (id<CDVCommandDelegate>) commandDelegate
356356
withCallbackId: (NSString*) callbackId {
357357
IdmLog(@"resetIdleTimeout invoked");
358358
OMAuthenticationContext* context = [self.ommss authenticationContext];

src/ios/src/IdmAuthenticationPlugin.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ - (void) setup:(CDVInvokedUrlCommand *) command {
105105
return;
106106
}
107107

108-
__weak CDVCommandDelegateImpl* delegate = self.commandDelegate;
108+
__weak id<CDVCommandDelegate> delegate = self.commandDelegate;
109109

110110
self.setupCompletionCallback = ^(IdmAuthentication * authFlow, NSError * error) {
111111
if (error != nil) {

src/ios/src/LocalAuthenticator.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
*/
55
#import <Foundation/Foundation.h>
66
#import "IDMMobileSDKv2Library.h"
7-
#import <Cordova/CDVCommandDelegateImpl.h>
7+
#import <Cordova/CDVCommandDelegate.h>
88
#import <Cordova/CDVPluginResult.h>
99

1010
@interface LocalAuthenticator : NSObject
1111

1212
+(LocalAuthenticator*) sharedInstance;
1313

14-
-(void) enabledLocalAuthsPrimaryFirst:(CDVInvokedUrlCommand*)command delegate:(CDVCommandDelegateImpl*) commandDelegate;
15-
-(void) enable:(CDVInvokedUrlCommand*)command delegate:(CDVCommandDelegateImpl*) commandDelegate;
16-
-(void) disable:(CDVInvokedUrlCommand*)command delegate:(CDVCommandDelegateImpl*) commandDelegate;
17-
-(void) authenticateBiometric:(CDVInvokedUrlCommand*)command delegate:(CDVCommandDelegateImpl*) commandDelegate;
18-
-(void) authenticatePin:(CDVInvokedUrlCommand*)command delegate:(CDVCommandDelegateImpl*) commandDelegate;
19-
-(void) changePin:(CDVInvokedUrlCommand*)command delegate:(CDVCommandDelegateImpl*) commandDelegate;
20-
-(void) getLocalAuthSupportInfo:(CDVInvokedUrlCommand*)command delegate:(CDVCommandDelegateImpl*) commandDelegate;
21-
-(void) getPreference:(CDVInvokedUrlCommand*)command delegate:(CDVCommandDelegateImpl*) commandDelegate;
22-
-(void) setPreference:(CDVInvokedUrlCommand*)command delegate:(CDVCommandDelegateImpl*) commandDelegate;
14+
-(void) enabledLocalAuthsPrimaryFirst:(CDVInvokedUrlCommand*)command delegate:(id<CDVCommandDelegate>) commandDelegate;
15+
-(void) enable:(CDVInvokedUrlCommand*)command delegate:(id<CDVCommandDelegate>) commandDelegate;
16+
-(void) disable:(CDVInvokedUrlCommand*)command delegate:(id<CDVCommandDelegate>) commandDelegate;
17+
-(void) authenticateBiometric:(CDVInvokedUrlCommand*)command delegate:(id<CDVCommandDelegate>) commandDelegate;
18+
-(void) authenticatePin:(CDVInvokedUrlCommand*)command delegate:(id<CDVCommandDelegate>) commandDelegate;
19+
-(void) changePin:(CDVInvokedUrlCommand*)command delegate:(id<CDVCommandDelegate>) commandDelegate;
20+
-(void) getLocalAuthSupportInfo:(CDVInvokedUrlCommand*)command delegate:(id<CDVCommandDelegate>) commandDelegate;
21+
-(void) getPreference:(CDVInvokedUrlCommand*)command delegate:(id<CDVCommandDelegate>) commandDelegate;
22+
-(void) setPreference:(CDVInvokedUrlCommand*)command delegate:(id<CDVCommandDelegate>) commandDelegate;
2323
@end

src/ios/src/LocalAuthenticator.m

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ @interface LocalAuthenticator()<OMBiometricFallbackDelegate>
5353

5454
@property (nonatomic, strong) OMFallbackAuthenticationCompletionBlock fallbackHandler;
5555

56-
@property (nonatomic, strong, nullable) CDVCommandDelegateImpl* biometricAuthDelegate;
56+
@property (nonatomic, strong, nullable) id<CDVCommandDelegate> biometricAuthDelegate;
5757
@property (nonatomic, copy, nullable) NSString* biometricAuthCallbackId;
5858

5959
@end
@@ -72,7 +72,7 @@ +(LocalAuthenticator*) sharedInstance {
7272
return shared;
7373
}
7474

75-
-(void) enabledLocalAuthsPrimaryFirst:(CDVInvokedUrlCommand*)command delegate:(CDVCommandDelegateImpl*) commandDelegate {
75+
-(void) enabledLocalAuthsPrimaryFirst:(CDVInvokedUrlCommand*)command delegate:(id<CDVCommandDelegate>) commandDelegate {
7676
NSString* authId = command.arguments[0];
7777
CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK
7878
messageAsArray:[self getEnabled:authId]];
@@ -110,7 +110,7 @@ - (BOOL) enableDefaultAuthenticator {
110110
return YES;
111111
}
112112

113-
-(void) enable:(CDVInvokedUrlCommand*)command delegate:(CDVCommandDelegateImpl*) commandDelegate {
113+
-(void) enable:(CDVInvokedUrlCommand*)command delegate:(id<CDVCommandDelegate>) commandDelegate {
114114
NSError* enableError = nil;
115115
NSString* authId = command.arguments[0];
116116
NSString* authenticatorName = command.arguments[1];
@@ -179,7 +179,7 @@ -(void) enable:(CDVInvokedUrlCommand*)command delegate:(CDVCommandDelegateImpl*)
179179
[commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK] callbackId:command.callbackId];
180180
}
181181

182-
-(void) disable:(CDVInvokedUrlCommand*)command delegate:(CDVCommandDelegateImpl*) commandDelegate {
182+
-(void) disable:(CDVInvokedUrlCommand*)command delegate:(id<CDVCommandDelegate>) commandDelegate {
183183
NSError* disableError = nil;
184184
NSString* authId = command.arguments[0];
185185
NSString* authenticatorName = command.arguments[1];
@@ -219,7 +219,7 @@ -(void) disable:(CDVInvokedUrlCommand*)command delegate:(CDVCommandDelegateImpl*
219219
callbackId:command.callbackId];
220220
}
221221

222-
-(void) getPreference:(CDVInvokedUrlCommand*)command delegate:(CDVCommandDelegateImpl*) commandDelegate {
222+
-(void) getPreference:(CDVInvokedUrlCommand*)command delegate:(id<CDVCommandDelegate>) commandDelegate {
223223
NSString* authId = command.arguments[0];
224224
NSString* key = command.arguments[1];
225225
NSString* result;
@@ -242,7 +242,7 @@ -(void) getPreference:(CDVInvokedUrlCommand*)command delegate:(CDVCommandDelegat
242242
[commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:result] callbackId:command.callbackId];
243243
}
244244

245-
-(void) setPreference:(CDVInvokedUrlCommand*)command delegate:(CDVCommandDelegateImpl*) commandDelegate {
245+
-(void) setPreference:(CDVInvokedUrlCommand*)command delegate:(id<CDVCommandDelegate>) commandDelegate {
246246
NSString* authId = command.arguments[0];
247247
NSString* key = command.arguments[1];
248248
NSString* value = command.arguments[2];
@@ -300,7 +300,7 @@ -(void) setPreference:(CDVInvokedUrlCommand*)command delegate:(CDVCommandDelegat
300300
}
301301

302302
-(void) authenticateBiometric:(CDVInvokedUrlCommand*)command
303-
delegate:(CDVCommandDelegateImpl*)commandDelegate {
303+
delegate:(id<CDVCommandDelegate>)commandDelegate {
304304
NSString* authId = command.arguments[0];
305305
NSString* authType = command.arguments[1];
306306
NSDictionary* localizedStrings = command.arguments[2];
@@ -351,7 +351,7 @@ -(void) authenticateBiometric:(CDVInvokedUrlCommand*)command
351351
}
352352

353353
-(void) authenticatePin:(CDVInvokedUrlCommand*)command
354-
delegate:(CDVCommandDelegateImpl*)commandDelegate {
354+
delegate:(id<CDVCommandDelegate>)commandDelegate {
355355
NSError *authError = nil;
356356
NSString* authId = command.arguments[0];
357357
NSString* pin = command.arguments[1];
@@ -387,7 +387,7 @@ -(void) authenticatePin:(CDVInvokedUrlCommand*)command
387387
}
388388

389389
-(void) changePin:(CDVInvokedUrlCommand*)command
390-
delegate:(CDVCommandDelegateImpl*)commandDelegate {
390+
delegate:(id<CDVCommandDelegate>)commandDelegate {
391391
NSError* changePinError;
392392
NSString* authId = command.arguments[0];
393393
OMPinAuthenticator* pinAuthenticator = [self getPinAuthenticator:authId];
@@ -421,7 +421,7 @@ -(void) changePin:(CDVInvokedUrlCommand*)command
421421
}
422422

423423
-(void) getLocalAuthSupportInfo:(CDVInvokedUrlCommand*)command
424-
delegate:(CDVCommandDelegateImpl*)commandDelegate {
424+
delegate:(id<CDVCommandDelegate>)commandDelegate {
425425
NSMutableDictionary* auths = [[NSMutableDictionary alloc] init];
426426
auths[LOCAL_AUTH_PIN] = ENROLLED;
427427
auths[LOCAL_AUTH_FINGERPRINT] = [self getFingerprintSupportOnDevice];

0 commit comments

Comments
 (0)