I am working on the Spring WebFlux project.
I set values like below in my RestAuthFilter file.
exchange.getAttributes().put(UserConstants.ROLE, claims.get(UserConstants.ROLE));
Here the value is set and I could read it.
But When I am trying to get the same in the Controller file like below the value is NULL
String accessRole = exchange.getAttribute(UserConstants.ROLE);
Anyone can explain and give the solution, please?