Skip to content

Instantly share code, notes, and snippets.

@fschwiet
Created April 1, 2012 04:42
Show Gist options
  • Save fschwiet/2271479 to your computer and use it in GitHub Desktop.
Save fschwiet/2271479 to your computer and use it in GitHub Desktop.
public class EngageIdentity : IIdentity
{
private readonly string _name;
public EngageIdentity(string name)
{
_name = name;
}
public string Name
{
get { return _name; }
}
public string AuthenticationType
{
get { return "EngageNet"; }
}
public bool IsAuthenticated
{
get { return true; }
}
}
public class EngagePrincipal : IPrincipal
{
private readonly string _identifier;
public EngagePrincipal(string identifier)
{
_identifier = identifier;
}
public bool IsInRole(string role)
{
return false;
}
public IIdentity Identity
{
get { return new EngageIdentity(_identifier); }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment