Exemplo n.º 1
0
        private static IAuthenticationHandler GetAuthenticationHandler <T>(IAuthenticationInspector auth)
        {
            IAuthenticationHandler authHandler;

            if (auth == null)
            {
                authHandler = new NullAuthHandler();
            }
            else
            {
                authHandler = auth.GetHandler();
            }
            return(authHandler);
        }
Exemplo n.º 2
0
        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);
        }