Created
November 1, 2012 13:39
-
-
Save waldyrfelix/3993683 to your computer and use it in GitHub Desktop.
Implementado BasicAuthenticationAttribute
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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