Example #1
0
        public static void UseCloudFoundrySecurity(IConfiguration configuration, IEnumerable <ISecurityService> securityServices = null, ILoggerFactory loggerFactory = null)
        {
            var managementOptions = _mgmtOptions.OfType <CloudFoundryManagementOptions>().SingleOrDefault();

            if (managementOptions == null)
            {
                managementOptions = new CloudFoundryManagementOptions(configuration, Platform.IsCloudFoundry);
                _mgmtOptions.Add(managementOptions);
            }

            SecurityServices.Add(new CloudFoundrySecurity(new CloudFoundryEndpointOptions(configuration), managementOptions, CreateLogger <CloudFoundrySecurity>(loggerFactory)));
        }