Skip to content

Commit

Permalink
Update AuthenticationDialog.h
Browse files Browse the repository at this point in the history
  • Loading branch information
mcvermeulen authored Sep 25, 2018
1 parent 983ae49 commit 31a54f8
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions src/ios/AuthenticationDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,25 @@
#import <Foundation/Foundation.h>
#import <Cordova/CDVPlugin.h>

@interface AuthenticationDialog: CDVPlugin <NSURLConnectionDataDelegate>
@interface AuthenticationDialog: CDVPlugin <NSURLSessionDelegate>

@property NSString *uri;
@property NSString *userName;
@property NSString *password;
@property Boolean allowBypassAuth;


@property NSString *callbackId;


- (void)authenticate:(CDVInvokedUrlCommand*)command;
- (void)clearCredentials:(CDVInvokedUrlCommand*)command;

@end


typedef void (^CredentialsViewCallback)(NSString* userName, NSString* password, BOOL isCancelled);

@interface CredentialsViewController : UIViewController<UIAlertViewDelegate>

@property (copy) CredentialsViewCallback onResult;

- (void)requestUserCredentials:(NSString*)uri withUsername:(NSString*)userName;

- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex;

@end
NSURLSessionTask * _task;
NSString * _host;
NSURLCredentialPersistence _wantedPersistence;
NSURLCredential * _storedCredentials;
BOOL _explicitPersistCredentials;
BOOL _allowUsernameChange;

0 comments on commit 31a54f8

Please sign in to comment.