Implementing IIdentity, what is AuthenticationType?

4.6k views Asked by At

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?

1

There are 1 answers

2
Rob VS On

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".