tagged [jwt]

Use multiple JWT Bearer Authentication

Use multiple JWT Bearer Authentication Is it possible to support multiple JWT Token issuers in ASP.NET Core 2? I want to provide an API for external service and I need to use two sources of JWT tokens...

Token has expired

Token has expired ``` Token has expired at ServiceStack.Auth.JwtAuthProviderReader.AssertJwtPayloadIsValid(JsonObject jwtPayload) at ServiceStack.Auth.JwtAuthProviderReader.CreateSessionFromPayload(...

8 Sep at 08:37

Best HTTP Authorization header type for JWT

Best HTTP Authorization header type for JWT I'm wondering what is the best appropriate `Authorization` HTTP header type for [JWT tokens](http://jwt.io/). One of the probably most popular type is `Basi...

21 Oct at 17:55

How to issue and consume JWT using ServiceStack's JwtAuthProvider

How to issue and consume JWT using ServiceStack's JwtAuthProvider Looking at the [JwtAuthProvider documentation](https://github.com/ServiceStack/ServiceStack/wiki/JWT-AuthProvider) for ServiceStack, i...

18 Oct at 13:25

System.IdentityModel.Tokens.JwtSecurityToken custom properties

System.IdentityModel.Tokens.JwtSecurityToken custom properties My AuthServer is currently using the following code to generate a JwtSecurityToken: The payload look

3 Jan at 18:33

ASP.NET Core and JWT token lifetime

ASP.NET Core and JWT token lifetime I utilize `ASP.NET Core 2.1.1` It is interesting that the expiration time is only being taken into account when one provides `ClockSkew` - `JwtSecurityTokenHandler...

JWTSecurityTokenHandler and SecurityTokenDescriptor not found even though System.IdentityModel.Tokens installed and used

JWTSecurityTokenHandler and SecurityTokenDescriptor not found even though System.IdentityModel.Tokens installed and used I am trying to write a method to generate JWT token in .net C#. Searching throu...

20 May at 19:3

Add a claim to JWT as an array?

Add a claim to JWT as an array? Using thinktecture JWT authentication resource owner flow, I use the claims part of JWT for client consumption. My question is that if it's possible to add a claim in i...

Namespaces for .NET JWT token validation: System vs. Microsoft

Namespaces for .NET JWT token validation: System vs. Microsoft I am trying to use JWT to authenticate a Node application to an ASP.NET Web API. In ASP.NET, I am using .NET 4.5.1 and nuget package `Sys...

11 Aug at 21:49

Get claims and subscription in Web Api Controller (.Net Core 2.1)

Get claims and subscription in Web Api Controller (.Net Core 2.1) I'm using JWT with .Net Core 2.1, and the decorator on my controller class. In 2.0 it seemed you had to do something like the followin...

How can I add kid to jwt header using SecurityTokenDescriptor in .netcore

How can I add kid to jwt header using SecurityTokenDescriptor in .netcore I am using .netcore 2 with JwtSecurityToken to generate a token ``` var jwtSecurityToken = new JwtSecurityToken( issue...

Can ServiceStack validate JWT OOTB

Can ServiceStack validate JWT OOTB I'm looking over the auth docs [https://github.com/ServiceStack/ServiceStack/wiki/Authentication-and-authorization](https://github.com/ServiceStack/ServiceStack/wiki...

3 Feb at 20:11

How to apply custom validation to JWT token on each request for ASP.NET WebApi?

How to apply custom validation to JWT token on each request for ASP.NET WebApi? Is it possible to add custom validation to each request when authenticating web api calls using a bearer token? I'm usin...

23 Feb at 19:52

How to encrypt JWT security token?

How to encrypt JWT security token? I need to secure my web-token with signing and encryption. I wrote the next lines of code: ``` var tokenHandler = new JwtSecurityTokenHandler(); var tokenDescriptor ...

20 Oct at 04:4

JwtSecurityTokenHandler and TokenValidationParameters

JwtSecurityTokenHandler and TokenValidationParameters I used to have a reference to `Microsoft.IdentityModel.Tokens.JWT` and everything was working fine. I updated to use the new `System.IdentityModel...

26 Aug at 17:49

What is the difference between Bearer Token and Refresh Token?

What is the difference between Bearer Token and Refresh Token? In ServiceStack, I am using JwtAuthProvider, where I got Bearer Token and Refresh token so how do I verify the token and authorize the we...

6 Dec at 06:52

Is there any JSON Web Token (JWT) example in C#?

Is there any JSON Web Token (JWT) example in C#? I feel like I'm taking crazy pills here. Usually there's always a million library and samples floating around the web for any given task. I'm trying to...

19 Feb at 09:48

Can't get claims from JWT token with ASP.NET Core

Can't get claims from JWT token with ASP.NET Core I'm trying to do a really simple implementation of JWT bearer authentication with ASP.NET Core. I return a response from a controller a bit like this:...

JWT token authentication fails with message "PII is hidden"

JWT token authentication fails with message "PII is hidden" in my .net core 2.2 microservice, I try to extract claims from a JWT token to do some authorization. authentication is done on another part ...

.NET Web API: Set a different Refresh Token Expiration time for different users

.NET Web API: Set a different Refresh Token Expiration time for different users I'm using Identity Server 3 to authenticate and generate Access/Refresh tokens for my angular Client. I'm currently sett...

17 Oct at 00:56

Jwt Bearer and dependency injection

Jwt Bearer and dependency injection I am trying to configure my Jwt Bearer issuer key but, in production usually, I use Azure Key Vault wrapped by a `KeyManager`. The `KeyManager` class is configured ...

Get claims from a WebAPI Controller - JWT Token,

Get claims from a WebAPI Controller - JWT Token, I have built an application which uses JWT bearer authentication in ASP.NET Core. When authenticating I define some custom claims which i need to read ...

25 Jul at 23:55

ServiceStack: Can we Pass Data through a RequestFilterAttribute to the calling service

ServiceStack: Can we Pass Data through a RequestFilterAttribute to the calling service Maybe I'm thinking about this wrong, but I'm trying to create a custom attribute for our CMS to handle auth check...

How to generate JWT Token with IdentityModel Extensions for .NET 5

How to generate JWT Token with IdentityModel Extensions for .NET 5 I am using [IdentityModel Extensions for .NET](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet) ...

Conflict between System.IdentityModel.Tokens and Microsoft.IdentityModel.Tokens

Conflict between System.IdentityModel.Tokens and Microsoft.IdentityModel.Tokens I have a conflict when using System.IdentityModel.Tokens : ``` using System; using System.Configuration; using System.Da...

20 Jun at 09:12