I'm in a bit of a pickle here. I want to authenticate users through LDAP and automatically create accounts for users when they log in for the first time.
So far I've created a custom membership provider & I'm able to log in with my LDAP credentials. The next step I have in mind is to capture the username and store it in the local database, thus creating a new user. Problem is, the CreateUser method requires database items that I don't need such as 'IsApproved' or 'IsLockedOut'. I also don't want to store user passwords if possible and authenticate directly with the LDAP store.
To cut to the chase, which would be the best option?
- Stick to the current custom membership provider & have additional database fields that I don't require
- Implement custom membership user + custom membership provider (the long route)
- IPrincipal & IIdentity?
Any feedback would be appreciated. Thanks!
p.s. I'm using EF Code First with MVC 4.