public void Configuration(IAppBuilder app)
        {
            var cp = ConfigProfile.LoadConfigurationProfile();

            Logger.Current?.Info("Startup.Configuration invoked");
            JwtSecurityTokenHandler.InboundClaimTypeMap.Clear();

            app.UseIdentityServerBearerTokenAuthentication(new IdentityServerBearerTokenAuthenticationOptions {
                Authority      = cp.Authority,
                ClientId       = cp.ApiResourceName,
                ClientSecret   = cp.ApiResourceSecret,
                RequiredScopes = new[] { cp.RequiredScope, cp.RequiredAdminScope }
            });
        }
 protected void Application_Start(object sender, EventArgs e)
 {
     Logger.SetCurrent(_logger);
     ConfigProfile.LoadConfigurationProfile();
     WebApiConfig.Configure();
 }
Exemple #3
0
 public static ConfigProfile LoadConfigurationProfile()
 {
     Current = new ConfigProfile();
     return(Current);
 }