C
C#12mo ago
nicke

❔ GetOwinContext().Authentication.GetAuthenticationTypes() equivalent in asp.net core

Trying to migrate a asp.net MVC project to asp.net core and having trouble figuring out what authentication middlewares have been registred for usege on the client side.
13 Replies
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
nicke
nicke12mo ago
I need to figure out if there are any authentication methods configured or not. To display different information for the user (show sign in button or not)
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
nicke
nicke12mo ago
If it's jsut using windows authentication i don't want to display a sign out button to the user
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
nicke
nicke12mo ago
I guess i could just check the same flag that decides if Negotiate handler has been added. insdead of openidconnect handler. Thanks for the help
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
nicke
nicke12mo ago
yeah, just don't want to needlessly display the sign out button in that case
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
nicke
nicke12mo ago
right i can get the current authentication method that way 👍
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
nicke
nicke12mo ago
love the arrows, thanks 👍 I guess the AuthenticationType is not the same as AuthenticationScheme but i'll figure that out when i get there. Just +50 controllers to port first
Accord
Accord12mo ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.