Пример #1
0
        public IOcelotAdministrationBuilder AddAdministration(string path, Action <IdentityServerAuthenticationOptions> configureOptions)
        {
            var administrationPath = new AdministrationPath(path);

            if (configureOptions != null)
            {
                AddIdentityServer(configureOptions);
            }

            _services.AddSingleton <IAdministrationPath>(administrationPath);
            return(new OcelotAdministrationBuilder(_services, _configurationRoot));
        }
Пример #2
0
        public IOcelotAdministrationBuilder AddAdministration(string path, Action <IdentityServerAuthenticationOptions> configureOptions)
        {
            var administrationPath = new AdministrationPath(path);

            if (configureOptions != null)
            {
                AddIdentityServer(configureOptions);
            }

            //todo - hack because we add this earlier so it always exists for some reason...investigate..
            var descriptor = new ServiceDescriptor(typeof(IAdministrationPath), administrationPath);

            _services.Replace(descriptor);
            return(new OcelotAdministrationBuilder(_services, _configurationRoot));
        }
Пример #3
0
        public IOcelotAdministrationBuilder AddAdministration(string path, string secret)
        {
            var administrationPath = new AdministrationPath(path);

            //add identity server for admin area
            var identityServerConfiguration = IdentityServerConfigurationCreator.GetIdentityServerConfiguration(secret);

            if (identityServerConfiguration != null)
            {
                AddIdentityServer(identityServerConfiguration, administrationPath);
            }

            _services.AddSingleton <IAdministrationPath>(administrationPath);
            return(new OcelotAdministrationBuilder(_services, _configurationRoot));
        }
Пример #4
0
        public IOcelotAdministrationBuilder AddAdministration(string path, string secret)
        {
            var administrationPath = new AdministrationPath(path);

            //add identity server for admin area
            var identityServerConfiguration = IdentityServerConfigurationCreator.GetIdentityServerConfiguration(secret);

            if (identityServerConfiguration != null)
            {
                AddIdentityServer(identityServerConfiguration, administrationPath);
            }

            var descriptor = new ServiceDescriptor(typeof(IAdministrationPath), administrationPath);

            _services.Replace(descriptor);
            return(new OcelotAdministrationBuilder(_services, _configurationRoot));
        }