示例#1
0
 public Service(Service service)
 {
     XrdDocument = service.XrdDocument;
     SeedCapability = service.SeedCapability;
     OAuthRequestToken = service.OAuthRequestToken;
     OAuthAuthorizeToken = service.OAuthAuthorizeToken;
     OAuthGetAccessToken = service.OAuthGetAccessToken;
     CanOverride = service.CanOverride;
 }
示例#2
0
        public static ServiceProviderDescription CreateServiceProviderDescription(Service service)
        {
            ServiceProviderDescription desc = new ServiceProviderDescription();
            desc.RequestTokenEndpoint = new MessageReceivingEndpoint(service.OAuthRequestToken, HttpDeliveryMethods.PostRequest);
            desc.UserAuthorizationEndpoint = new MessageReceivingEndpoint(service.OAuthAuthorizeToken, HttpDeliveryMethods.GetRequest);
            desc.AccessTokenEndpoint = new MessageReceivingEndpoint(service.OAuthGetAccessToken, HttpDeliveryMethods.PostRequest);
            desc.TamperProtectionElements = new ITamperProtectionChannelBindingElement[] { new HmacSha1SigningBindingElement() };

            return desc;
        }