authentication - How to use AuthenticationManager SignIn when using OpenId -


we have need provide mixed mode authentication , we've spent weeks chasing down samples, , bits , pieces , have our claimsidentity built, need figure out way have owin recognize our claimsidentity logged in user.

everything we've found far defining app.usecookieautentication in startup.auth.configureauth(). set authenticationtype = "cookies", set login path.

however, use custom version of identity server 3 , in addition usecookieauthentication, use app.useopenidconnectauthentication.

we've had issues setting usecookieauthentication loginpath. we've tried putting in , leaving empty.

code use login our windows users, make calls identityserver, our tokens , claims.

we use usermanager.createidentityasync follows.

var _identity = await _usermanager.createidentityasync(_sluser, defaultauthenticationtypes.applicationcookie);

everything appears here.

then use identity following code:

var _ctx = httpcontext.current.getowincontext();

var _authenticationmanager = _ctx.authentication; _authenticationmanager.signin(new authenticationproperties() { ispersistent = false }, _identity);

the code runs when check _ctx.authentication.user, identity created still isn't showing results in user getting redirected login page on identity server.

so in summary, we're trying figure out how take claimsidentity we've authenticated , built in code , have become of apart of owincontexts authentication.user.identities available throughout our application.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -