Spring security 来自客户端的Spring安全令牌内省
我想通过配置Spring安全性来验证API中接收到的令牌,以便在给定的URI上检查它。基于我在互联网上看到的。我补充说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.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"
我做错了什么