Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring Boot OAuth2和Azure AD_Azure_Spring Boot - Fatal编程技术网

Spring Boot OAuth2和Azure AD

Spring Boot OAuth2和Azure AD,azure,spring-boot,Azure,Spring Boot,我正在尝试配置一个ResourceServer,其中Spring Boot Oauth2连接到Azure AD作为授权服务器,因此这是我的application.yml文件: security: oauth2: client: clientId: xxx clientSecret: xxx resource: security.oauth2.resource.jwk.key-set-uri: https://login.microsofto

我正在尝试配置一个ResourceServer,其中Spring Boot Oauth2连接到Azure AD作为授权服务器,因此这是我的application.yml文件:

security:
  oauth2:
    client:
      clientId: xxx
      clientSecret: xxx
    resource:
      security.oauth2.resource.jwk.key-set-uri: https://login.microsoftonline.com/common/discovery/keys
logging:
  level:
    org.springframework.security: debug
但当我尝试启动我的应用程序时,我得到了:

原因:缺少tokenInfoUri和userInfoUri,并且没有JWT验证器密钥


但是在Azure AD中,我没有tokenInfoUri,userInfoUri是:,但我认为它对客户端凭据流没有帮助(我的情况)

您的
应用程序.yml
文件中的
jwk.key set uri

security:
  oauth2:
    client:
      clientId: xxx
      clientSecret: xxx
    resource:
      jwk.key-set-uri: https://login.microsoftonline.com/common/discovery/keys
logging:
  level:
    org.springframework.security: debug

您的
application.yml
文件中的
jwk.key set uri
似乎有一个输入错误:

security:
  oauth2:
    client:
      clientId: xxx
      clientSecret: xxx
    resource:
      jwk.key-set-uri: https://login.microsoftonline.com/common/discovery/keys
logging:
  level:
    org.springframework.security: debug