コード例 #1
0
        public async Task return_invalid_if_remote_and_local_are_not_equal()
        {
            var filter  = new LocalAuthenticationFilter();
            var context = GetContextWithRequest("/path", remoteIpAddress: "25.36.78.151", "127.0.1.100");

            (await filter.IsValid(context))
            .Should()
            .BeFalse();
        }
コード例 #2
0
        public async Task return_valid_if_request_is_from_remote_loopback()
        {
            var filter  = new LocalAuthenticationFilter();
            var context = GetContextWithRequest("/path", remoteIpAddress: "::1", "127.0.1.100");

            (await filter.IsValid(context))
            .Should()
            .BeTrue();
        }