The distributed permission system parses the login user information at the gateway layer, and how to store it for use by other service layers (without using third-party caches such as redis)

problem description

A distributed permission system that parses request headers at the gateway layer to obtain operation user information and wants to store this information in a location so that other services can use it

the environmental background of the problems and what methods you have tried

try: 1. Put the user information in the attribute of request

 2requestgate-controller-service 
    requestcontrollerservicefilter 
    controllerservice 
    request
 3

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

put the user information in the request in the gate layer, and retrieve the data directly from the request in the controller layer or service layer. If you don"t use redis here, you don"t want to add extra dependencies to the project.

Aug.27,2021
Menu