cordova-plugin-ete-authdialog
Version:
Adds support for authentication dialogs into Apache Cordova.
30 lines (18 loc) • 1.08 kB
Markdown
Adds support for authentication dialogs into Apache Cordova (Phonegap build support added)
## Installation
```
cordova plugin add cordova-plugin-ete-authdialog
```
## Supported Platforms
- iOS
## Supported Authentication Methods
- Basic
- Digest
- NTLM
## Platform quirks
### iOS
Requires manually executing the following method before accessing protected space (navigation or XmlHttpRequests).
```authDialog.authenticate(uri, /*optional*/ successCallback, /*optional*/ errorCallback, /*optional*/ userName, /*optional*/ password, /*optional*/ maxAttempts, /*optional*/ alertTitle, /*optional*/ alertMessage, /*optional*/ alertCancelButton, /*optional*/ alertLoginButton);```
Credentials are automatically cached by UIWebView so you do NOT need to enter them every app start. In this case ```authDialog.authenticate``` is executed w/o showing any credentials pop-up dialog.
After authentication is you can do XmlHttpRequests or display protected space via ```window.location = 'some protected uri' ``` or using InAppBrowser plugin.