IdentityServer4.Contrib.AccessTokenValidation 1.0.0-alpha1

This is a prerelease version of IdentityServer4.Contrib.AccessTokenValidation.
dotnet add package IdentityServer4.Contrib.AccessTokenValidation --version 1.0.0-alpha1                
NuGet\Install-Package IdentityServer4.Contrib.AccessTokenValidation -Version 1.0.0-alpha1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="IdentityServer4.Contrib.AccessTokenValidation" Version="1.0.0-alpha1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add IdentityServer4.Contrib.AccessTokenValidation --version 1.0.0-alpha1                
#r "nuget: IdentityServer4.Contrib.AccessTokenValidation, 1.0.0-alpha1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install IdentityServer4.Contrib.AccessTokenValidation as a Cake Addin
#addin nuget:?package=IdentityServer4.Contrib.AccessTokenValidation&version=1.0.0-alpha1&prerelease

// Install IdentityServer4.Contrib.AccessTokenValidation as a Cake Tool
#tool nuget:?package=IdentityServer4.Contrib.AccessTokenValidation&version=1.0.0-alpha1&prerelease                

IdentityServer4 - AccessTokenValidation

OWIN Middleware to validate access tokens from IdentityServer v4.

This is based on the archived IdentityServer3 Access Token Validation package https://github.com/IdentityServer/IdentityServer3.AccessTokenValidation

What is changed:
  • Updated the dependencies versions
  • Added ValidAudience property to the options, when present it will replace the old way /resources audience checks
  • Changed token type validation to at+jwt
  • Default ValidationMode set to Local
TODO:
  • Remote validation (currently only ValidationMode.Local is supported)
  • Automatic audience setting based on the request URL

Examples

app.UseIdentityServerBearerTokenAuthentication(new IdentityServerBearerTokenAuthenticationOptions
    {
        Authority = "https://identity.identityserver.io",
        ValidAudience = "https://example.com/api"
    });

The middleware can also do the scope validation in one go.

app.UseIdentityServerBearerTokenAuthentication(new IdentityServerBearerTokenAuthenticationOptions
    {
        Authority = "https://identity.identityserver.io",
        ValidAudience = "https://example.com/api",
        RequiredScopes = new[] { "api1", "api2" }
    });
Product Compatible and additional computed target framework versions.
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0-alpha1 160 6/28/2022