Class ServerHttpSecurity.OAuth2ResourceServerSpec
- java.lang.Object
-
- org.springframework.security.config.web.server.ServerHttpSecurity.OAuth2ResourceServerSpec
-
- Enclosing class:
- ServerHttpSecurity
public class ServerHttpSecurity.OAuth2ResourceServerSpec extends java.lang.ObjectConfigures OAuth2 Resource Server Support
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classServerHttpSecurity.OAuth2ResourceServerSpec.JwtSpecConfigures JWT Resource Server SupportclassServerHttpSecurity.OAuth2ResourceServerSpec.OpaqueTokenSpecConfigures Opaque Token Resource Server support
-
Constructor Summary
Constructors Constructor Description OAuth2ResourceServerSpec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServerHttpSecurity.OAuth2ResourceServerSpecaccessDeniedHandler(org.springframework.security.web.server.authorization.ServerAccessDeniedHandler accessDeniedHandler)Configures theServerAccessDeniedHandlerto use for requests authenticating with Bearer Tokens.ServerHttpSecurityand()ServerHttpSecurity.OAuth2ResourceServerSpecauthenticationEntryPoint(org.springframework.security.web.server.ServerAuthenticationEntryPoint entryPoint)Configures theServerAuthenticationEntryPointto use for requests authenticating with Bearer Tokens.ServerHttpSecurity.OAuth2ResourceServerSpecauthenticationFailureHandler(org.springframework.security.web.server.authentication.ServerAuthenticationFailureHandler authenticationFailureHandler)ServerHttpSecurity.OAuth2ResourceServerSpecauthenticationManagerResolver(org.springframework.security.authentication.ReactiveAuthenticationManagerResolver<org.springframework.web.server.ServerWebExchange> authenticationManagerResolver)Configures theReactiveAuthenticationManagerResolverServerHttpSecurity.OAuth2ResourceServerSpecbearerTokenConverter(org.springframework.security.web.server.authentication.ServerAuthenticationConverter bearerTokenConverter)Configures theServerAuthenticationConverterto use for requests authenticating with Bearer Tokens.protected voidconfigure(ServerHttpSecurity http)ServerHttpSecurity.OAuth2ResourceServerSpec.JwtSpecjwt()Enables JWT Resource Server support.ServerHttpSecurity.OAuth2ResourceServerSpecjwt(Customizer<ServerHttpSecurity.OAuth2ResourceServerSpec.JwtSpec> jwtCustomizer)Enables JWT Resource Server support.ServerHttpSecurity.OAuth2ResourceServerSpec.OpaqueTokenSpecopaqueToken()Enables Opaque Token Resource Server support.ServerHttpSecurity.OAuth2ResourceServerSpecopaqueToken(Customizer<ServerHttpSecurity.OAuth2ResourceServerSpec.OpaqueTokenSpec> opaqueTokenCustomizer)Enables Opaque Token Resource Server support.
-
-
-
Method Detail
-
accessDeniedHandler
public ServerHttpSecurity.OAuth2ResourceServerSpec accessDeniedHandler(org.springframework.security.web.server.authorization.ServerAccessDeniedHandler accessDeniedHandler)
Configures theServerAccessDeniedHandlerto use for requests authenticating with Bearer Tokens. requests.- Parameters:
accessDeniedHandler- theServerAccessDeniedHandlerto use- Returns:
- the
ServerHttpSecurity.OAuth2ResourceServerSpecfor additional configuration - Since:
- 5.2
-
authenticationEntryPoint
public ServerHttpSecurity.OAuth2ResourceServerSpec authenticationEntryPoint(org.springframework.security.web.server.ServerAuthenticationEntryPoint entryPoint)
Configures theServerAuthenticationEntryPointto use for requests authenticating with Bearer Tokens.- Parameters:
entryPoint- theServerAuthenticationEntryPointto use- Returns:
- the
ServerHttpSecurity.OAuth2ResourceServerSpecfor additional configuration - Since:
- 5.2
-
authenticationFailureHandler
public ServerHttpSecurity.OAuth2ResourceServerSpec authenticationFailureHandler(org.springframework.security.web.server.authentication.ServerAuthenticationFailureHandler authenticationFailureHandler)
-
bearerTokenConverter
public ServerHttpSecurity.OAuth2ResourceServerSpec bearerTokenConverter(org.springframework.security.web.server.authentication.ServerAuthenticationConverter bearerTokenConverter)
Configures theServerAuthenticationConverterto use for requests authenticating with Bearer Tokens.- Parameters:
bearerTokenConverter- TheServerAuthenticationConverterto use- Returns:
- The
ServerHttpSecurity.OAuth2ResourceServerSpecfor additional configuration - Since:
- 5.2
-
authenticationManagerResolver
public ServerHttpSecurity.OAuth2ResourceServerSpec authenticationManagerResolver(org.springframework.security.authentication.ReactiveAuthenticationManagerResolver<org.springframework.web.server.ServerWebExchange> authenticationManagerResolver)
Configures theReactiveAuthenticationManagerResolver- Parameters:
authenticationManagerResolver- theReactiveAuthenticationManagerResolver- Returns:
- the
ServerHttpSecurity.OAuth2ResourceServerSpecfor additional configuration - Since:
- 5.3
-
jwt
public ServerHttpSecurity.OAuth2ResourceServerSpec.JwtSpec jwt()
Enables JWT Resource Server support.- Returns:
- the
ServerHttpSecurity.OAuth2ResourceServerSpec.JwtSpecfor additional configuration
-
jwt
public ServerHttpSecurity.OAuth2ResourceServerSpec jwt(Customizer<ServerHttpSecurity.OAuth2ResourceServerSpec.JwtSpec> jwtCustomizer)
Enables JWT Resource Server support.- Parameters:
jwtCustomizer- theCustomizerto provide more options for theServerHttpSecurity.OAuth2ResourceServerSpec.JwtSpec- Returns:
- the
ServerHttpSecurity.OAuth2ResourceServerSpecto customize
-
opaqueToken
public ServerHttpSecurity.OAuth2ResourceServerSpec.OpaqueTokenSpec opaqueToken()
Enables Opaque Token Resource Server support.- Returns:
- the
ServerHttpSecurity.OAuth2ResourceServerSpec.OpaqueTokenSpecfor additional configuration
-
opaqueToken
public ServerHttpSecurity.OAuth2ResourceServerSpec opaqueToken(Customizer<ServerHttpSecurity.OAuth2ResourceServerSpec.OpaqueTokenSpec> opaqueTokenCustomizer)
Enables Opaque Token Resource Server support.- Parameters:
opaqueTokenCustomizer- theCustomizerto provide more options for theServerHttpSecurity.OAuth2ResourceServerSpec.OpaqueTokenSpec- Returns:
- the
ServerHttpSecurity.OAuth2ResourceServerSpecto customize
-
configure
protected void configure(ServerHttpSecurity http)
-
and
public ServerHttpSecurity and()
-
-