Category "jwt"

My HMACSHA256 signature validation almost works but not quite

I wrote a method that takes a JWT as a request and checks if the signature is valid. This is the unit test: @Test public void isValid() { final JwtValidator

Why did user object is undefined in NextAuth session callback?

I use NextAuth for signIn with discord provider and I need to add userID into the session object. For that I use session callback but user object is undefined.

Issue with JWT token multiple simultaneously refresh with Refresh token

Tools: .NET 6 with EF Core, Vue 3 with Axios. R-Token is Refresh Token. DB is database. I have simple implementation of JWT + Refresh Token auth. Client send Lo

How to redirect to new page with Authorization Headers after login?

I have a login page. On click of login button, the details are sent to server and are validated. A token is received in return after successful validation. I ne

How to properly setup JwtBearerOptions

I setup Identity Server 4 to issue JWT tokens to authenticate users. In Identity Server 4 I have setup the following: public class Resources { public stati

Apple server api Unauthorized in prod env

I am testing the apple server api. Everything works fine in the sandbox environment. But when I change the url from sandbox to prod environment, I only get 401

How to change the `frontend_domain` port in `GRAPHQL_AUTH` in the verification mail?

I'm working on a Docker-Django-Graphene-React stack where Django is the backend which receive GraphQL queries through Graphene from React which acts as the fron

Nuxt auth user reset after browser refresh

i'm building an app with user login and register info. I use nuxt/auth module for handling the authentification. Whenever the user get logs in the state change

[Authorize(Roles="xx") seems no working in asp.net web api

I am working with an ASP.NET web API project (not .NET Core). I want to add [Authorize(Roles="xx") to my controller action. But it seems not working (always 401

How to avoid jwt token or ignore authentication when testing HTTP API request?

mvc.perform(MockMvcRequestBuilders.get("/PensionerDetailByAadhaar?aadhaarNumber=123").header("Authorization","Bearer "+token)).andExpect(status().isOk()); Here

FastAPI OAuth2PasswordRequestForm dependency causing request failure

I'm using the auth scheme detailed in FastAPI's user guide (JWT/Bearer token). When I try to get a token from the /token endpoint the request fails before the p

Micronaut Security - Set PublicKey for RSASignatureConfiguration

All the examples of how to validate a JWT token that I found in micronaut are using a "secret". They do it this way: micronaut: security: authentication:

I get jwt.exceptions.DecodeError: Invalid header padding

So I have a simple flask app. Logging in creates a token: token = jwt.encode({'user': token_data}, app.config['SECRET_KEY']).decode('utf-8') The middleware loo

nginx unknown directive "auth_jwt"

I want set jwt auth on my nginx but I got this error: nginx: [emerg] unknown directive "auth_jwt" in /usr/local/etc/nginx/nginx.conf I have nginx version: ng

How To set and get content of Payload in JWT Token

I have created a JWT Token in Spring Boot for storing User Details. When I use Jwttokenutil.getUsernameFromToken(authToken) [ authToken is the token passed ] me

Could not load file or assembly 'Microsoft.IdentityModel.Tokens, Version=5.2.0.0

I am trying to add OWIN JWT into webapi project using VS 2015. The reference shows Microsoft.Owin.Security.Jwt, Version=4.0.0.0 and Microsoft.IdentityModel.Toke

Using a Zapier Custom Request Webhook with JSON Web Tokens

I need to access an API that uses JSON Web Tokens as their authentication method. Is there a good way to use a python code step to create this token then add th

Using a Zapier Custom Request Webhook with JSON Web Tokens

I need to access an API that uses JSON Web Tokens as their authentication method. Is there a good way to use a python code step to create this token then add th

How to manage the Strategy user info in NestJS and pass it to the client side in Angular?

I'm doing a little project in this quarantine time to learn about the backend part of a project. In this case I'm using Angular as client-side and NestJS as bac

How to access JWT sub-claims using Go?

I need to retrieve the values of sub-claims from a JWT in Go. I have (legacy) JWTs I need to parse in go, which contain a custom claim "data" which holds an Js