在Azure ADB2C中配置资源所有者密码流

时间:2018-10-15 05:27:20

标签: azure azure-active-directory azure-ad-b2c appauth

我正在遵循this示例来实现ropc工作流程。

我已按照this教程添加了资源所有者策略,并更新了client_id,redirect_uri,authorization_scope和Discovery_uri的所有字段

在运行android应用时出现以下错误。

E/AppAuth: Network error when retrieving discovery document
           java.io.FileNotFoundException: https://login.microsoftonline.com/tfp/tenantName.onmicrosoft.com/B2C_1_ResourceOwner/.well-known/openid-configuration
               at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:255)
               at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
               at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(Unknown Source:0)
               at net.openid.appauth.AuthorizationServiceConfiguration$ConfigurationRetrievalAsyncTask.doInBackground(AuthorizationServiceConfiguration.java:332)
               at net.openid.appauth.AuthorizationServiceConfiguration$ConfigurationRetrievalAsyncTask.doInBackground(AuthorizationServiceConfiguration.java:305)
               at android.os.AsyncTask$2.call(AsyncTask.java:333)
               at java.util.concurrent.FutureTask.run(FutureTask.java:266)
               at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
               at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
               at java.lang.Thread.run(Thread.java:764)
I/LoginActivity: Failed to retrieve discovery document
                 AuthorizationException: {"type":0,"code":3,"errorDescription":"Network error"}
                     at net.openid.appauth.AuthorizationServiceConfiguration$ConfigurationRetrievalAsyncTask.doInBackground(AuthorizationServiceConfiguration.java:340)
                     at net.openid.appauth.AuthorizationServiceConfiguration$ConfigurationRetrievalAsyncTask.doInBackground(AuthorizationServiceConfiguration.java:305)
                     at android.os.AsyncTask$2.call(AsyncTask.java:333)
                     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
                     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
                     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
                     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
                     at java.lang.Thread.run(Thread.java:764)
                  Caused by: java.io.FileNotFoundException: https://login.microsoftonline.com/tfp/tenantName.onmicrosoft.com/B2C_1_ResourceOwner/.well-known/openid-configuration
                     at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:255)
                     at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
                     at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(Unknown Source:0)
                     at net.openid.appauth.AuthorizationServiceConfiguration$ConfigurationRetrievalAsyncTask.doInBackground(AuthorizationServiceConfiguration.java:332)
                     at net.openid.appauth.AuthorizationServiceConfiguration$ConfigurationRetrievalAsyncTask.doInBackground(AuthorizationServiceConfiguration.java:305) 
                     at android.os.AsyncTask$2.call(AsyncTask.java:333) 
                     at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
                     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
                     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
                     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
                     at java.lang.Thread.run(Thread.java:764) 

即使更新自己租户的值,我也会收到此错误

0 个答案:

没有答案