Skip to content

Commit

Permalink
Add commented-out code/config to support scaling security sample
Browse files Browse the repository at this point in the history
Add some missing publish profiles
  • Loading branch information
Tim Hess committed Nov 7, 2018
1 parent afe0b45 commit 1230e10
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 0 deletions.
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<PublishProvider>FileSystem</PublishProvider>
<LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<publishUrl>bin\debug\net461\win10-x64\publish</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
</PropertyGroup>
</Project>
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<PublishProvider>FileSystem</PublishProvider>
<LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<PrecompileBeforePublish>True</PrecompileBeforePublish>
<EnableUpdateable>True</EnableUpdateable>
<DebugSymbols>False</DebugSymbols>
<WDPMergeOption>DonotMerge</WDPMergeOption>
<ExcludeApp_Data>False</ExcludeApp_Data>
<publishUrl>bin\debug\net461\win10-x64\publish</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
</PropertyGroup>
</Project>
Expand Up @@ -11,5 +11,9 @@
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Steeltoe.Extensions.Configuration.CloudFoundryCore" Version="$(SteeltoeConfigVersion)" />
<PackageReference Include="Steeltoe.Security.Authentication.CloudFoundryCore" Version="$(SteeltoeSecurityVersion)" />
<!-- <PackageReference Include="Microsoft.AspNetCore.Session" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.Extensions.Caching.Redis" Version="2.1.1" />
<PackageReference Include="Steeltoe.CloudFoundry.ConnectorCore" Version="2.1.0" />
<PackageReference Include="Steeltoe.Security.DataProtection.RedisCore" Version="$(SteeltoeSecurityVersion)" /> -->
</ItemGroup>
</Project>
12 changes: 12 additions & 0 deletions Security/src/AspDotNetCore/CloudFoundrySingleSignon/Startup.cs
@@ -1,11 +1,14 @@
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Steeltoe.CloudFoundry.Connector.Redis;
using Steeltoe.Security.Authentication.CloudFoundry;
using Steeltoe.Security.DataProtection;

namespace CloudFoundrySingleSignon
{
Expand Down Expand Up @@ -44,6 +47,15 @@ public void ConfigureServices(IServiceCollection services)
});

// Add Redis to allow scaling beyond a single instance
// services.AddRedisConnectionMultiplexer(Configuration);
// services.AddDataProtection()
// .PersistKeysToRedis()
// .SetApplicationName("fortuneui");

// services.AddDistributedRedisCache(Configuration);
// services.AddSession();

services.AddMvc();
}

Expand Down
Expand Up @@ -9,3 +9,4 @@ applications:
ASPNETCORE_ENVIRONMENT: Development
services:
- mySSOService
# - myRedisService

0 comments on commit 1230e10

Please sign in to comment.