Skip to content

Instantly share code, notes, and snippets.

@trailmax
Last active April 30, 2017 22:17
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 trailmax/3d1c8fc56a04479d4ca3b8c226e07eb3 to your computer and use it in GitHub Desktop.
Save trailmax/3d1c8fc56a04479d4ca3b8c226e07eb3 to your computer and use it in GitHub Desktop.
AuthenticationFactory
public class AuthenticationFactory
{
public IAuthenticationManager GetManager()
{
return HttpContext.Current.Request.GetOwinContext().Authentication;
}
}
// register it like this
container.RegisterType<AuthenticationFactory>();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment