hwsecurity-fido / de.cotech.hw.fido / WebViewFidoBridge /

WebViewFidoBridge

open class WebViewFidoBridge

If you are using a WebView for your login flow, you can use this WebViewFidoBridge for extending the WebView’s Javascript API with the official FIDO U2F APIs.

Currently supported: - High level API of U2F v1.1, https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/fido-u2f-javascript-api-v1.2-ps-20170411.html

Note: Currently only compatible and tested with Android SDK >= 19 due to evaluateJavascript() calls.

Types

Name Summary
JsInterface open class JsInterface
RequestData abstract class RequestData

Functions

Name Summary
createInstanceForWebView

open fun createInstanceForWebView(activity: AppCompatActivity, webView: WebView): WebViewFidoBridge
open fun createInstanceForWebView(activity: AppCompatActivity, webView: WebView, optionsBuilder: FidoDialogOptions.Builder): WebViewFidoBridge

Create an instance of the bridge from an activity and attach it to a WebView.

open fun createInstanceForWebView(context: Context, fragmentManager: FragmentManager, webView: WebView): WebViewFidoBridge
open fun createInstanceForWebView(context: Context, fragmentManager: FragmentManager, webView: WebView, optionsBuilder: FidoDialogOptions.Builder): WebViewFidoBridge

Create an instance of the bridge from anywhere using a FragmentManager and attach it to a WebView.

delegateOnPageStarted

open fun delegateOnPageStarted(view: WebView, url: String, favicon: Bitmap)

Call this in your WebViewClient.

delegateShouldInterceptRequest

open fun delegateShouldInterceptRequest(view: WebView, request: WebResourceRequest)
open fun delegateShouldInterceptRequest(view: WebView, url: String)

Call this in your WebViewClient.