Пример #1
0
        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 }
            });
        }
Пример #2
0
 protected void Application_Start(object sender, EventArgs e)
 {
     Logger.SetCurrent(_logger);
     ConfigProfile.LoadConfigurationProfile();
     WebApiConfig.Configure();
 }
Пример #3
0
 public static ConfigProfile LoadConfigurationProfile()
 {
     Current = new ConfigProfile();
     return(Current);
 }