Skip to content

Instantly share code, notes, and snippets.

@benfoster
Created May 2, 2012 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benfoster/2581054 to your computer and use it in GitHub Desktop.
Save benfoster/2581054 to your computer and use it in GitHub Desktop.
Is Authentication really that complicated.....
IAuthenticationService
bool IsValidLogin(string username, string password);
bool CreateLogin(string username, string password);
string GeneratePasswordResetToken(string username, int lifeInMinutes);
bool ResetPassword(string username, string token, string newPassword);
IMembershipService
UserProfile FindUserWithLogin(string provider, string providerId);
UserProfile Register(string name, string email, string provider, string providerId);
UserProfile
Name
Email
Logins
ProviderLogin
ProviderId
ProviderUserId
E.g.
ProviderId: Local, ProviderUserId: foo@bar.com
ProviderId: TwitterOAuth, ProviderUserId: 123456
ProviderId: OpenID, ProviderUserId: myname.myopenid.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment