The App SDK provides an interface to integrate FIDO authentication into an existing OIDC Federation infrastructure. Use this interface as an OIDC Federation client. After an end user authenticates and your app receives the AuthenticationData object from the App SDK, initiate the OIDC flow:
val config = OidcFederationClient.OidcFederationParams();
config.authFlowUrl = "<OIDC_AUTH_URL>"
config.federationResumeUrl = "<OIDC_RESUME_URL>"
config.tokenUrl = "<OIDC_TOKEN_URL>"
config.jwt = Model.sessionData?.get("sessionKey").toString()
val client = OidcFederationClient(config, this)
client.performCodeGrantFlow().then { result ->
Log.i(TAG, "Code Grant flow completed successfully")
val oidcResult = result as OidcResult
Log.d(TAG, "id_token :" + oidcResult.id_token)
Log.d(TAG, "refresh_token :" + oidcResult.refresh_token)
}.error { exception ->
Log.e(TAG, "OIDC code grant flow failed", exception as Exception)
}Class OidcFederationClient contains methods that support the following OIDC flows:
Authorization code grant
Implicit
Token refresh
Working example in Tutorial App
MainActivity.kt shows how to initiate OIDC flows.