檢視行動應用程式範例日誌
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。
SDK for Android 應用程式會為使用者建立階段作業:
"...
[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 中的 MyApps 或 MyGroups 按鈕時,才會顯示此訊息。