Skip to content

Instantly share code, notes, and snippets.

@morsdyce
Created November 3, 2012 09:36
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 morsdyce/4006803 to your computer and use it in GitHub Desktop.
Save morsdyce/4006803 to your computer and use it in GitHub Desktop.
public class FormsAuthenticationService : IFormsAuthenticationService
{
public void SignIn(string userName, bool createPersistentCookie)
{
if (String.IsNullOrEmpty(userName)) throw new ArgumentException("Value cannot be null or empty.", "userName");
FormsAuthentication.SetAuthCookie(userName, createPersistentCookie);
}
public void SignOut()
{
FormsAuthentication.SignOut();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment