Skip to content

Instantly share code, notes, and snippets.

@waldyrfelix
Created November 1, 2012 13:39
Show Gist options
  • Save waldyrfelix/3993683 to your computer and use it in GitHub Desktop.
Save waldyrfelix/3993683 to your computer and use it in GitHub Desktop.
Implementado BasicAuthenticationAttribute
public class AppBasicAuthenticationAttribute : BasicAuthenticationAttribute
{
public override string Realm { get { return "DOMINIO"; }}
public override bool Authorize(string username, string password)
{
var membershipService = IoC.Current.Resolve<IMembershipService>();
return membershipService.ValidateUser(username, password);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment