johannes-staehlin / cordova-client-cert-authentication

Client Certificate Authentication for Android Cordova
Apache License 2.0
7 stars 8 forks source link

Is this functional #2

Closed j3k0 closed 8 years ago

j3k0 commented 8 years ago

I don't see any javascript side API. how to use this plugin? is it functional?

johannes-staehlin commented 8 years ago

The plugin does not need any JavaScript part. It just waits until the SSLSocket asks the client for a certificate (see onReceivedClientCertRequest) and then handles it by showing the default client-cert pop-up you'd also get when visiting this page in Android Chrome Browser. However, it also remembers your choice and save it to the shared preferences.

Just add the following line to you config.xml of you project:

<plugin name="cordova-client-cert-authentication" version="1" />

then run your usual commands like:

cordova platform add android
cordova build
...