如何解决Okta应用程序问题?

问题描述 投票:0回答:1

我按照这里的说明:https://github.com/okta/samples-js-react/tree/master/okta-hosted-login

在这里:https://github.com/okta/samples-java-spring/tree/master/resource-server

...设置一个使用Okta进行身份验证的示例reactjs app。

与我的开发者Okta帐户一样工作。

但是当我尝试使用我的组织的Okta配置时,我在尝试启动资源服务器时遇到错误。

以下是我的application.yml中的配置:

okta:
  oauth2:
    issuer: "https://<myOrgName>.okta-emea.com/oauth2/default"
    client-id: "<myClientId>"
    client-secret: "<myClientSecret>"

我在Okta开发人员控制台中使用Web配置创建了一个新应用程序,它给了我clientId和clientSecret。

当我这样做时:

cd resource-server
mvn

我看到这个错误:

[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.8.RELEASE:run (default-cli) on project okta-spring-boot-oauth-resource-server: An exception occurred while running. null: InvocationTargetException: Failed to process import candidates for configuration class [org.springframework.boot.autoconfigure.security.oauth2.resource.OAuth2ResourceServerConfiguration]; nested exception is java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerTokenServicesConfiguration$JwkTokenStoreConfiguration: 401 Unauthorized -> [Help 1]

关于我缺少什么的任何指示?我怎样才能解决出错的问题? Okta的所有日志?

spring-boot okta
1个回答
0
投票

碰巧我们需要启用付费附加组件“API访问管理”来实现这一目标。 https://www.okta.com/pricing/?&_ga=2.83722128.789595063.1528210367-1946999837.1524501420#api-access-management

© www.soinside.com 2019 - 2024. All rights reserved.