查看示例移动应用程序日志

Android 示例应用程序记录有关验证用户的信息。

要查看日志,请在 Android Studio 中单击窗口底部的运行选项卡。您可以从下载部分下载日志示例。

示例应用程序日志显示了用户验证过程中的以下步骤。

首次联系 Oracle Identity Cloud Service

"...
[OMOICMobileSecurityConfiguration] Downloading openID well known configuration from URL:...
..."

调用 Oracle Identity Cloud Service 验证 API:

"...
[OMMobileSecurityService] Authenticate API called for first time after app launch -> Removing session cookies
...
[OAuthConnectionsUtil] This is openID Configuration Use case
...
[DefaultStateTransition] getInitialState authScheme : OPENIDCONNECT10 TYPE : OAUTH20_AC_SERVICE
..."

验证配置的浏览器模式:

"...
[OAuthAuthorizationCodeService] Creating Challenge for browser mode: EMBEDDED
[OAuthAuthorizationCodeService] Challenge : type : EMBEDDED_WEBVIEW_REQUIRED
.."

浏览器调用 Oracle Identity Cloud Service 授权端点:

"...
[oracle.idm.mobile.auth.webview.OAuthWebViewConfigurationHandler] Loading login load  URL in the webview
..."

此消息后跟 Oracle Identity Cloud Service 的授权端点 URL。

Oracle Identity Cloud Service 在浏览器中显示登录页面:

"...
[oracle.idm.mobile.auth.webview.OAuthWebViewConfigurationHandler] onPageStarted:
..."

此消息后跟 Oracle Identity Cloud Service 的登录页 URL。

成功登录后,浏览器将关闭,控件将返回到应用程序。

应用程序与 Oracle Identity Cloud Service 令牌端点联系以交换 Oracle Identity Cloud Service 发送的授权代码:

"...
[OAuthAuthorizationCodeService] onAuthZCode
[OAuthConnectionsUtil] getBackChannelRequestForAccessToken :  grantType : AUTHORIZATION_CODE
...
[OMConnectionHandler]  http method              : POST
[OMConnectionHandler]  http request URL             
..."

最后一条消息后跟 Oracle Identity Cloud Service 的令牌端点 URL。

Android 应用程序的 SDK 为用户创建一个会话:

"...
[AuthenticationServiceManager.AuthenticationAsyncTask] Authentication context status : SUCCESS
..."

应用程序可以使用 SDK for Android 应用程序会话中存在的令牌对 Oracle Identity Cloud Service 端点执行其他 REST API 调用:

"...
[OpenIDConnect10AuthenticationService] Access token(s) valid : true
[OpenIDConnect10AuthenticationService] OpenId token not expired!
...
[OAuthAuthorizationService] Method: GETrequested on URL
..."

消息后跟 Oracle Identity Cloud Service MyApps 或 MyGroups 端点 URL。仅当在应用程序 UI 中单击 MyAppsMyGroups 按钮时,才会显示此消息。