Exemplo n.º 1
0
        public void AddBasicAuthentication(BasicAuthenticationSecurityTokenHandler.ValidateUserNameCredentialDelegate validationDelegate)
        {
            var handler = new BasicAuthenticationSecurityTokenHandler(validationDelegate);

            AddMapping(new AuthenticationOptionMapping
            {
                TokenHandler = new SecurityTokenHandlerCollection {
                    handler
                },
                Options = AuthenticationOptions.ForAuthorizationHeader(scheme: "Basic")
            });
        }
        public void AddBasicAuthentication(BasicAuthenticationSecurityTokenHandler.ValidateUserNameCredentialDelegate validationDelegate)
        {
            var handler = new BasicAuthenticationSecurityTokenHandler(validationDelegate);

            AddMapping(new AuthenticationOptionMapping
            {
                TokenHandler = new SecurityTokenHandlerCollection { handler },
                Options = AuthenticationOptions.ForAuthorizationHeader(scheme: "Basic")
            });
        }