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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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 | Versions 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.
-
- IdentityModel (>= 5.2.0)
- Microsoft.AspNet.WebApi.Client (>= 5.2.7)
- Microsoft.IdentityModel.Protocols.OpenIdConnect (>= 6.14.1)
- Microsoft.Owin.Security.Jwt (>= 4.2.0)
- Newtonsoft.Json (>= 10.0.1)
- System.IdentityModel.Tokens.Jwt (>= 6.14.1)
- System.Numerics.Vectors (>= 4.5.0)
- System.Runtime.CompilerServices.Unsafe (>= 5.0.0)
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 | 158 | 6/28/2022 |