I have a JWT (JSON Web Token) that contains a user code in the payload. I determine the user code by parsing the payload once the JWT has been verified. The user code needs to be available to multiple different classes and I want to avoid extracting the specific HTTP header and parsing the JWT more than once (once when authorizing and however many times its needed in the code thereafter) to extract the user code. I have overridden the IsAuthorized method in order to perform the JWT validation.
An ASP.Net Web API validates the JWT. Is it possible to have a static Global.cs which holds static variables for classes? What implications are faced when their are multiple users accessing the website? Will there be an instance of the Global.cs per user connected to the Web API?