internal static Uri GetStsUri(Uri stsUri, string appliesTo)
        {
            if (stsUri != null)
            {
                return(new Uri(stsUri, "WRAPv0.9/"));
            }
            string str = TokenProviderHelper.ExtractSolutionFromHostname((new Uri(appliesTo)).Host);

            return(ServiceBusEnvironment.CreateAccessControlUri(str));
        }
示例#2
0
 private static void ValidateSchemeAndNamespace(string scheme, string serviceNamespace)
 {
     if (!ServiceBusEnvironment.ValidateScheme(scheme))
     {
         throw new ArgumentException(SRClient.InvalidSchemeValue("sb"), "scheme");
     }
     if (!ServiceBusEnvironment.ValidateServiceNamespace(serviceNamespace))
     {
         throw new ArgumentException(SRClient.InvalidServiceNameSpace(serviceNamespace), "serviceNamespace");
     }
 }
示例#3
0
        private static Uri CreateServiceUri(string scheme, string serviceNamespace, string servicePath, bool suppressRelayPathPrefix, string hostName)
        {
            string str = serviceNamespace.Trim();

            ServiceBusEnvironment.ValidateSchemeAndNamespace(scheme, str);
            if (!servicePath.EndsWith("/", StringComparison.Ordinal))
            {
                servicePath = string.Concat(servicePath, "/");
            }
            Uri uri = ServiceBusUriHelper.CreateServiceUri(scheme, str, hostName, servicePath, suppressRelayPathPrefix);

            if (!ServiceBusUriHelper.IsSafeBasicLatinUriPath(uri))
            {
                throw new ArgumentException(SRClient.PathSegmentASCIICharacters, servicePath);
            }
            return(uri);
        }
示例#4
0
 public static Uri CreateServiceUri(string scheme, string serviceNamespace, string servicePath, bool suppressRelayPathPrefix)
 {
     return(ServiceBusEnvironment.CreateServiceUri(scheme, serviceNamespace, servicePath, suppressRelayPathPrefix, RelayEnvironment.RelayHostRootName));
 }
示例#5
0
 public static Uri CreateServiceUri(string scheme, string serviceNamespace, string servicePath)
 {
     return(ServiceBusEnvironment.CreateServiceUri(scheme, serviceNamespace, servicePath, false, RelayEnvironment.RelayHostRootName));
 }