当我尝试访问用户资源时,提示客户端不允许使用client_credentials授予类型

时间:2020-10-22 17:19:00

标签: java auth0

在我们的应用中,我们使用客户端凭据,以便客户端可以从Auth0请求用户列表。我应该对此进行更改,以便API使用自己的访问权限来获取列表。

现在我们当前的应用程序已切换为“单页应用程序”,因此,当我现在尝试获取用户时,除了以下例外,我无法获取用户列表。

ERROR [2020-10-13 12:52:25,409] io.dropwizard.jersey.errors.IllegalStateExceptionMapper: Error handling a request: f1a10d41768f0a72 ! com.auth0.exception.APIException: Request failed with status code 403: Grant type 'client_credentials' not allowed for the client. ! at com.auth0.net.ExtendedBaseRequest.createResponseException(ExtendedBaseRequest.java:128) ! at com.auth0.net.ExtendedBaseRequest.parseResponse(ExtendedBaseRequest.java:63) ! at com.auth0.net.BaseRequest.execute(BaseRequest.java:31) ! at co.uk.orchardsystems.arrears.auth.ManagementAPIProvider.setManagementAPI(ManagementAPIProvider.java:28) ! ... 81 common frames omitted ! Causing: java.lang.IllegalStateException: Error retrieving management token information from Auth0 ! at co.uk.orchardsystems.arrears.auth.ManagementAPIProvider.setManagementAPI(ManagementAPIProvider.java:33) ! at co.uk.orchardsystems.arrears.auth.ManagementAPIProvider.getManagementAPI(ManagementAPIProvider.java:56) ! at co.uk.orchardsystems.arrears.api.resource.UserResource.listUsers(UserResource.java:69) ! at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

0 个答案:

没有答案