Class RSocketConfiguration
java.lang.Object
ir.msob.jima.security.api.rsocket.oauth2.RSocketConfiguration
Configuration class for setting up RSocket-specific configurations related to security
and message handling in a Spring application using OAuth2 for authentication.
This class provides bean definitions for configuring JWT (JSON Web Token) authentication for RSocket communication, including the authentication manager and RSocket message handler.
Usage: Include this configuration class in your application's configuration to enable RSocket security with OAuth2-based JWT authentication.
- Since:
- 0.1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.oauth2.server.resource.authentication.JwtReactiveAuthenticationManagerjwtReactiveAuthenticationManager(org.springframework.security.oauth2.jwt.ReactiveJwtDecoder decoder, JwtRoleConverter jwtRoleConverter) Bean definition for JwtReactiveAuthenticationManager.org.springframework.messaging.rsocket.annotation.support.RSocketMessageHandlermessageHandler(org.springframework.messaging.rsocket.RSocketStrategies strategies) Bean definition for RSocketMessageHandler.
-
Constructor Details
-
RSocketConfiguration
public RSocketConfiguration()
-
-
Method Details
-
jwtReactiveAuthenticationManager
@Bean public org.springframework.security.oauth2.server.resource.authentication.JwtReactiveAuthenticationManager jwtReactiveAuthenticationManager(org.springframework.security.oauth2.jwt.ReactiveJwtDecoder decoder, JwtRoleConverter jwtRoleConverter) Bean definition for JwtReactiveAuthenticationManager.- Parameters:
decoder- The ReactiveJwtDecoder for decoding JWTs.jwtRoleConverter- The JwtRoleConverter for converting JWT roles to authorities.- Returns:
- An instance of JwtReactiveAuthenticationManager configured with the provided decoder and converter.
-
messageHandler
@Bean public org.springframework.messaging.rsocket.annotation.support.RSocketMessageHandler messageHandler(org.springframework.messaging.rsocket.RSocketStrategies strategies) Bean definition for RSocketMessageHandler.- Parameters:
strategies- The RSocketStrategies to be used by the message handler.- Returns:
- An instance of RSocketMessageHandler configured with the provided strategies.
-