Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implementing IIdentity, what is AuthenticationType?

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?

like image 367
TDaver Avatar asked May 03 '11 11:05

TDaver


1 Answers

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

like image 175
Rob VS Avatar answered Nov 09 '22 08:11

Rob VS