Class ServerHttpSecurity.OAuth2ResourceServerSpec.JwtSpec
- java.lang.Object
-
- org.springframework.security.config.web.server.ServerHttpSecurity.OAuth2ResourceServerSpec.JwtSpec
-
- Enclosing class:
- ServerHttpSecurity.OAuth2ResourceServerSpec
public class ServerHttpSecurity.OAuth2ResourceServerSpec.JwtSpec extends java.lang.Object
Configures JWT Resource Server Support
-
-
Constructor Summary
Constructors Constructor Description JwtSpec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServerHttpSecurity.OAuth2ResourceServerSpec
and()
ServerHttpSecurity.OAuth2ResourceServerSpec.JwtSpec
authenticationManager(org.springframework.security.authentication.ReactiveAuthenticationManager authenticationManager)
Configures theReactiveAuthenticationManager
to useprotected void
configure(ServerHttpSecurity http)
protected org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,? extends reactor.core.publisher.Mono<? extends org.springframework.security.authentication.AbstractAuthenticationToken>>
getJwtAuthenticationConverter()
protected org.springframework.security.oauth2.jwt.ReactiveJwtDecoder
getJwtDecoder()
ServerHttpSecurity.OAuth2ResourceServerSpec.JwtSpec
jwkSetUri(java.lang.String jwkSetUri)
Configures aReactiveJwtDecoder
using JSON Web Key (JWK) URLServerHttpSecurity.OAuth2ResourceServerSpec.JwtSpec
jwtAuthenticationConverter(org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,? extends reactor.core.publisher.Mono<? extends org.springframework.security.authentication.AbstractAuthenticationToken>> jwtAuthenticationConverter)
Configures theConverter
to use for converting aJwt
into anAbstractAuthenticationToken
.ServerHttpSecurity.OAuth2ResourceServerSpec.JwtSpec
jwtDecoder(org.springframework.security.oauth2.jwt.ReactiveJwtDecoder jwtDecoder)
Configures theReactiveJwtDecoder
to useServerHttpSecurity.OAuth2ResourceServerSpec.JwtSpec
publicKey(java.security.interfaces.RSAPublicKey publicKey)
Configures aReactiveJwtDecoder
that leverages the providedRSAPublicKey
-
-
-
Method Detail
-
authenticationManager
public ServerHttpSecurity.OAuth2ResourceServerSpec.JwtSpec authenticationManager(org.springframework.security.authentication.ReactiveAuthenticationManager authenticationManager)
Configures theReactiveAuthenticationManager
to use- Parameters:
authenticationManager
- the authentication manager to use- Returns:
- the
JwtSpec
for additional configuration
-
jwtAuthenticationConverter
public ServerHttpSecurity.OAuth2ResourceServerSpec.JwtSpec jwtAuthenticationConverter(org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,? extends reactor.core.publisher.Mono<? extends org.springframework.security.authentication.AbstractAuthenticationToken>> jwtAuthenticationConverter)
Configures theConverter
to use for converting aJwt
into anAbstractAuthenticationToken
.- Parameters:
jwtAuthenticationConverter
- the converter to use- Returns:
- the
JwtSpec
for additional configuration - Since:
- 5.1.1
-
jwtDecoder
public ServerHttpSecurity.OAuth2ResourceServerSpec.JwtSpec jwtDecoder(org.springframework.security.oauth2.jwt.ReactiveJwtDecoder jwtDecoder)
Configures theReactiveJwtDecoder
to use- Parameters:
jwtDecoder
- the decoder to use- Returns:
- the
JwtSpec
for additional configuration
-
publicKey
public ServerHttpSecurity.OAuth2ResourceServerSpec.JwtSpec publicKey(java.security.interfaces.RSAPublicKey publicKey)
Configures aReactiveJwtDecoder
that leverages the providedRSAPublicKey
- Parameters:
publicKey
- the public key to use.- Returns:
- the
JwtSpec
for additional configuration
-
jwkSetUri
public ServerHttpSecurity.OAuth2ResourceServerSpec.JwtSpec jwkSetUri(java.lang.String jwkSetUri)
Configures aReactiveJwtDecoder
using JSON Web Key (JWK) URL- Parameters:
jwkSetUri
- the URL to use.- Returns:
- the
JwtSpec
for additional configuration
-
and
public ServerHttpSecurity.OAuth2ResourceServerSpec and()
-
configure
protected void configure(ServerHttpSecurity http)
-
getJwtDecoder
protected org.springframework.security.oauth2.jwt.ReactiveJwtDecoder getJwtDecoder()
-
getJwtAuthenticationConverter
protected org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,? extends reactor.core.publisher.Mono<? extends org.springframework.security.authentication.AbstractAuthenticationToken>> getJwtAuthenticationConverter()
-
-