identityserver4 - Can someone explain HttpContext.Authentication.GetTokenAsync("access_token") -


i have implemented asp.net core mvc client using hybrid flow, , wondering httpcontext.authentication.gettokenasync("access_token") does.

if need more background on question:

the instructions accessing api asp.net core client app controller action follows:

var accesstoken = await httpcontext.authentication.gettokenasync("access_token"); var client = new httpclient(); client.setbearertoken(accesstoken); var response = await client.getasync("http://localhost:5001/api/stuff"); 

there magic in httpcontext.authentication.gettokenasync("access_token") :-)

i wondering function might doing. decrypting access token cookie in mvc app domain? ... id4 domain?

i sorry have been unable find sufficient documentation on or finding cookie access token may in. have looked here: https://docs.microsoft.com/en-us/aspnet/core/api/microsoft.aspnetcore.authentication.authenticationtokenextensions

does know does? link more thorough documentation totally appreciated answer.

tu!

you can store arbitrary tokens in authentication cookie in , method returns 1 given name. setting have happened during sign in process. in short, comes authentication cookie client application , typically set @ point of sign in using idsrv4.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -