Skip to content

Commit

Permalink
Move to package license expression (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hawxy authored Feb 6, 2022
1 parent c2627c0 commit 27fbdc3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Alba/Alba.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<AssemblyName>Alba</AssemblyName>
<PackageId>Alba</PackageId>
<PackageProjectUrl>http://jasperfx.github.io/alba/</PackageProjectUrl>
<PackageLicenseUrl>https://raw.githubusercontent.com/JasperFx/alba/master/LICENSE</PackageLicenseUrl>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>git://github.com/JasperFx/alba</RepositoryUrl>
<OutputType>library</OutputType>
Expand Down
2 changes: 1 addition & 1 deletion src/Alba/Security/OpenConnectExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async Task IAlbaExtension.Start(IAlbaHost host)

// This seems to be necessary to "bake" in the JwtBearerOptions modifications
var options = host.Services.GetRequiredService<IOptionsMonitor<JwtBearerOptions>>()
.Get("Bearer");
.Get(JwtBearerDefaults.AuthenticationScheme);

var authorityUrl = options.Authority;
_disco = await _client.GetDiscoveryDocumentAsync(authorityUrl);
Expand Down
5 changes: 3 additions & 2 deletions src/WebAppSecuredWithJwt/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Security.Claims;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
Expand Down Expand Up @@ -35,9 +36,9 @@ public void ConfigureServices(IServiceCollection services)
c.SwaggerDoc("v1", new OpenApiInfo {Title = "WebAppSecuredWithJwt", Version = "v1"});
});

services.AddAuthentication("Bearer")
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)

.AddJwtBearer("Bearer", options =>
.AddJwtBearer(options =>
{
// A real application would pull all this information from configuration
// of course, but I'm hardcoding it in testing
Expand Down

0 comments on commit 27fbdc3

Please sign in to comment.