Implementing IIdentity, what is AuthenticationType?
Asked Answered
M

1

15

I have a custom class (with properties like UserID, UserName, UserEmail, etc) implementing IIdentity. I login through custom logic, which reads from sql. What should IIdentity's AuthenticationType return?

Magyar answered 3/5, 2011 at 11:37 Comment(0)
J
5

The best that I can gather is that AuthenticationType is an arbitrary string that you can use in your app to determine the type of authentication that was used by a user.

For example, your app may offer a couple of different authentication mechanisms such as Passport and Custom, where Custom is something that you rolled yourself and decided to call it "Custom". Elsewhere in your app, you might have logic that needs to know how the user was authenticated, in which case you check the AuthenticationType value against the name of your custom mechanism - "Custom".

Joettejoey answered 4/10, 2012 at 18:25 Comment(2)
can you provide any links, where you "gathered"?Magyar
Even years later, this would be a great snippet for them to include in the remarks of this property.Exacting

© 2022 - 2024 — McMap. All rights reserved.