.net - Getting UserIdentity returns the old identity -


in mvc have custom authorizeattribute. inside attribute sign in useridentity cookie authentication. in claims have refresh token changed in each request api know.

request.getowincontext().authentication.signin(authproperties, identity); 

so after login i'm signed in specific refresh token claim(for example 'xxxxx'). access 1 of actions has customauthorizeattribute. in customauthorizeattribute above code executed. i'm signed in new identity , new refresh token claim("yyyyyy"). when try claim in action refresh token old 1 ("xxxxxx").

    [customauthorize]     public actionresult edituser()     {         var useridentity = this.user.identity claimsidentity;          //here old 1 token         var refreshtoken = useridentity.claims.firstordefault(s => s.type == "refreshtoken").value;           return view("edituser");     } 

any ideas how latest token claims. other workaround save in session guess.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -