コード例 #1
0
        public void UnauthorizedUser()
        {
            var client = WSTrustClientFactory.CreateMixedUserNameClient(
                Constants.Credentials.UnauthorizedUserName,
                Constants.Credentials.ValidPassword,
                baseAddressUserName);

            RequestSecurityTokenResponse rstr;
            var token = client.Issue(_rst, out rstr);
        }
コード例 #2
0
        public void InvalidUserNameCredential()
        {
            var client = WSTrustClientFactory.CreateMixedUserNameClient(
                Constants.Credentials.ValidUserName,
                "invalid",
                baseAddressUserName);

            RequestSecurityTokenResponse rstr;
            var token = client.Issue(_rst, out rstr);
        }
コード例 #3
0
        public void Setup()
        {
            _mixedUserNameClient = WSTrustClientFactory.CreateMixedUserNameClient(
                Constants.Credentials.ValidUserName,
                Constants.Credentials.ValidPassword,
                baseAddressUserName);

            _mixedCertificateClient = WSTrustClientFactory.CreateMixedCertificateClient(
                Constants.Certificates.ValidClientCertificateName,
                baseAddressCertificate);

            _rst = new RequestSecurityToken
            {
                AppliesTo   = new EndpointAddress(rp),
                RequestType = RequestTypes.Issue,
                KeyType     = KeyTypes.Symmetric
            };
        }