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: 1493
Reputation: 15167
You can add it as a claim.
manager.AddClaim(userId, new Claim("AccessToken", AccessToken));
Upvotes: 2