public OAuthIssuerServiceHost(
            Type serviceType, 
            Uri[] baseAddresses, 
            OAuthIssuerConfiguration configuration)
            : base(serviceType, baseAddresses)
        {
            if (configuration == null)
                throw new ArgumentNullException("configuration");

            Configuration = configuration;
        }
示例#2
0
        public OAuthIssuerServiceHost(
            Type serviceType,
            Uri[] baseAddresses,
            OAuthIssuerConfiguration configuration) : base(serviceType, baseAddresses)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }

            Configuration = configuration;
        }
示例#3
0
        public static void Main(string[] args)
        {
            var config = new OAuthIssuerConfiguration { SecurityTokenService = typeof(JwtSecurityTokenService) };
            config.TokenIssuerName = "MyCustomIssuer";

            config.SecurityTokenHandlers.AddOrReplace(new UserNamePasswordSecurityTokenHandler());

            var wsh = new OAuthIssuerServiceHost(config, new Uri("http://localhost:9111/WRAPv0.9"));
            wsh.Open();

            foreach (var ep in wsh.Description.Endpoints)
            {
                Console.WriteLine(ep.ListenUri);
            }

            Console.WriteLine("OAuth Issuer Ready...");
            Console.ReadLine();

            wsh.Close();
        }
示例#4
0
        public static void Main(string[] args)
        {
            var config = new OAuthIssuerConfiguration {
                SecurityTokenService = typeof(JwtSecurityTokenService)
            };

            config.TokenIssuerName = "MyCustomIssuer";

            config.SecurityTokenHandlers.AddOrReplace(new UserNamePasswordSecurityTokenHandler());

            var wsh = new OAuthIssuerServiceHost(config, new Uri("http://localhost:9111/WRAPv0.9"));

            wsh.Open();

            foreach (var ep in wsh.Description.Endpoints)
            {
                Console.WriteLine(ep.ListenUri);
            }

            Console.WriteLine("OAuth Issuer Ready...");
            Console.ReadLine();

            wsh.Close();
        }
 public OAuthIssuerServiceHost(OAuthIssuerConfiguration configuration, Uri baseAddress)
     : this(typeof(JwtIssuer), new[] { baseAddress }, configuration)
 {
 }
 public OAuthIssuerServiceHost(OAuthIssuerConfiguration configuration)
     : this(typeof(JwtIssuer), null, configuration)
 {
 }
示例#7
0
 public OAuthIssuerServiceHost(OAuthIssuerConfiguration configuration, Uri baseAddress)
     : this(typeof(JwtIssuer), new[] { baseAddress }, configuration)
 {
 }
示例#8
0
 public OAuthIssuerServiceHost(OAuthIssuerConfiguration configuration)
     : this(typeof(JwtIssuer), null, configuration)
 {
 }