question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

System.Identity.Tokens.Jwt Can't find IssuerSigningTokens

See original GitHub issue

I use vsersion 5.0.0.127

In vsersion 5.0.0.127, can’t find TokenValidationParameters

Later found it in Microsoft. IdentityModel. Tokens

Where is my lovely IssuerSigningTokens

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tofutimcommented, Feb 21, 2017

Can someone leave a clue on how to convert? I am working on Microsoft.Azure.Mobile.Server.

            TokenValidationParameters validationParams = new TokenValidationParameters
            {
                ValidateAudience = true,
                ValidAudience = Audience,
                ValidateIssuer = true,
                ValidIssuer = Issuer,
                ValidateLifetime = parsedToken.Payload.Exp.HasValue,  // support tokens with no expiry				
                IssuerSigningKey = new BinarySecretSecurityToken(HmacSigningCredentials.ParseKeyString(SigningKey))
            };

Need to change BinarySecretSecurityToken to IssuerSigningKey. I presume I use tha tSigningKey at the end, but how to make that into a SecurityKey?

0reactions
brentschmaltzcommented, Oct 23, 2018

@ShaneCourtrille you will have to update your code when moving to 5.x+.

This may help you: https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/wiki/Migrating-from-Katana-(OWIN)-3.x-to-4.x

As a note, we are maintaining a strong back-compat model from 5.x forward.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - TokenValidationParameters no longer working after ...
TokenValidationParameters is in assembly: Microsoft.IdentityModel.Tokens. It looks like you are using Katana (the first version of asp.net ...
Read more >
Access Token validating fails with JWTSecurityTokenHandler
I try to validate an access token, which I get from Azure. ... Token with JWTSecurityTokenHandler, but die signature is invalid: Microsoft.
Read more >
TokenValidationParameters Class
Gets or sets a delegate that will be used to validate the type of the token. If the token type cannot be validated,...
Read more >
System.IdentityModel.Tokens.Jwt 6.32.1
Includes types that provide support for creating, serializing and validating JSON Web Tokens.
Read more >
Creating And Validating JWT Tokens In C# .NET
Signing simply verifies that it was us who created the token and whether it's been tampered with, but it does not “encrypt” the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found