Reputation: 354
I have OAuth2 Authorization Layer and Service layer as part of my MVC application. The Access Token obtained from OAuth2 should be accessible to Service layer as medium to communicate to APIs. I was considering storing them to Session at class level, so, is this the right method or can I store them to some custom storage ?
Upvotes: 1
Views: 1484
Reputation: 15107
You can add it as a claim.
manager.AddClaim(userId, new Claim("AccessToken", AccessToken));
Upvotes: 2