Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/security/4.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 security 来自客户端的Spring安全令牌内省_Spring Security_Spring Oauth2 - Fatal编程技术网

Spring security 来自客户端的Spring安全令牌内省

Spring security 来自客户端的Spring安全令牌内省,spring-security,spring-oauth2,Spring Security,Spring Oauth2,我想通过配置Spring安全性来验证API中接收到的令牌,以便在给定的URI上检查它。基于我在互联网上看到的。我补充说 spring.security.oauth2.resourceserver.jwt.issuer-uri=https://url/protocol/openid-connect/token/introspect 到我的application.properties 我还添加了.oauth2ResourceServer().jwt();对于我的Spring配置,它看起来像

我想通过配置Spring安全性来验证API中接收到的令牌,以便在给定的URI上检查它。基于我在互联网上看到的。我补充说

spring.security.oauth2.resourceserver.jwt.issuer-uri=https://url/protocol/openid-connect/token/introspect
到我的application.properties

我还添加了.oauth2ResourceServer().jwt();对于我的Spring配置,它看起来像

   http
                    .csrf().disable().cors()
                    .and()
                    .antMatcher("/api/project/**")
                        .authorizeRequests()
                            .antMatchers("/api/project/projectIds", "/api/project/**/involvement").permitAll()
                            .and()
                    .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
                    .and()
                    .oauth2ResourceServer().jwt();
当我尝试部署应用程序时,出现以下错误:

Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is org.springfra
mework.beans.factory.BeanCreationException: Error creating bean with name 'jwtDecoderByIssuerUri' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OA
uth2ResourceServerJwtConfiguration$JwtDecoderConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instant
iate [org.springframework.security.oauth2.jwt.JwtDecoder]: Factory method 'jwtDecoderByIssuerUri' threw exception; nested exception is java.lang.IllegalArgumentException: Unable to resolve the Configurati
on with the provided Issuer of "https://url/protocol/openid-connect/token/introspect"

我做错了什么