Dealing with auth and package versions issues between 1.1 and 2.0
This commit is contained in:
parent
c28b693db9
commit
65bcf48246
@ -3,11 +3,16 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard1.5</TargetFramework>
|
||||
<RootNamespace>Microsoft.eShopOnContainers.BuildingBlocks</RootNamespace>
|
||||
<!--
|
||||
<NetStandardImplicitPackageVersion>2.0.0-preview1-25301-01</NetStandardImplicitPackageVersion>
|
||||
-->
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="1.1.2" />
|
||||
<!--
|
||||
<PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="2.0.0-preview1-final" />
|
||||
-->
|
||||
<PackageReference Include="StackExchange.Redis" Version="1.2.3" />
|
||||
</ItemGroup>
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<RuntimeFrameworkVersion>1.1.2</RuntimeFrameworkVersion>
|
||||
<OutputType>Exe</OutputType>
|
||||
<UserSecretsId>aspnet-eShopOnContainers.Identity-90487118-103c-4ff0-b9da-e5e26f7ab0c5</UserSecretsId>
|
||||
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;portable-net45+win8</PackageTargetFallback>
|
||||
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
|
||||
|
@ -83,7 +83,7 @@ namespace Microsoft.eShopOnContainers.WebMVC
|
||||
var callBackUrl = Configuration.GetValue<string>("CallBackUrl");
|
||||
// Add Authentication services
|
||||
services.AddCookieAuthentication(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
services.AddOpenIdConnectAuthentication("Oidc", options =>
|
||||
services.AddOpenIdConnectAuthentication(OpenIdConnectDefaults.AuthenticationScheme, options =>
|
||||
{
|
||||
options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
|
||||
options.Authority = identityUrl.ToString();
|
||||
@ -101,8 +101,11 @@ namespace Microsoft.eShopOnContainers.WebMVC
|
||||
options.Scope.Add("marketing");
|
||||
});
|
||||
|
||||
services.AddAuthentication(sharedOptions => sharedOptions.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
|
||||
services.AddAuthentication(options => {
|
||||
options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme;
|
||||
options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
|
||||
options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;
|
||||
});
|
||||
}
|
||||
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
@ -125,7 +128,7 @@ namespace Microsoft.eShopOnContainers.WebMVC
|
||||
|
||||
app.UseStaticFiles();
|
||||
|
||||
|
||||
app.UseAuthentication();
|
||||
|
||||
var log = loggerFactory.CreateLogger("identity");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user