private static IAuthenticationHandler GetAuthenticationHandler <T>(IAuthenticationInspector auth) { IAuthenticationHandler authHandler; if (auth == null) { authHandler = new NullAuthHandler(); } else { authHandler = auth.GetHandler(); } return(authHandler); }
private static object GetAuthenticationHandler(IAuthenticationInspector auth, IServiceProvider serviceLocator) { IAuthenticationHandler authHandler; if (auth == null) { authHandler = serviceLocator.GetService <IAuthenticationHandler>() ?? new NullAuthHandler(); } else { authHandler = auth.GetHandler(serviceLocator); } return(authHandler); }