Ejemplo n.º 1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
        {
            loggerFactory.AddConsole();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseCors(options =>
            {
                options.AllowAnyOrigin();
                options.AllowAnyMethod();
                options.AllowAnyHeader();
            });

            /* Resource Server Middleware goes here
             */
            ResourceServerOptions rsOptions = new ResourceServerOptions();

            rsOptions.CryptionKey = Configuration["CryptionKey"];
            rsOptions.Issuer      = "FlixReseller Issuer";

            app.UseResourceServerMiddleware(rsOptions);

            app.UseMvc();

            app.Run(async(context) =>
            {
                await context.Response.WriteAsync("Hello World!");
            });
        }
Ejemplo n.º 2
0
 public OAuthServerOptions()
 {
     AuthorizationServer = new AuthorizationServerOptions();
     ResourceServer      = new ResourceServerOptions();
 }