Questions tagged [jjwt]

Use when referencing the JJWT library for the JVM and Android

The JJWT library for the JVM and Android: https://github.com/jwtk/jjwt

138 questions
2
votes
2 answers

Parsing a RS256 JWT from Xero using JJWT

I'm trying to parse a JWT from Xero for SSO. Xero documentation states "The JWT is a JSON payload signed with your client secret and the RS256 signing algorithm". I can get the JWT from Xero. I know my "client secret" (string). How do put it…
Bernie
  • 31
  • 1
2
votes
0 answers

Springboot security+JWT refresh token

I have an Angular app with Spring boot as backend. I have implemented Spring security with JWT authentication. The workflow is as follows Angular will call a create token end point which will return a JWT token Client will use this token for any…
ShefZee
  • 95
  • 7
2
votes
1 answer

jwt dependency not found in Springboot 2.2.6

I'am trying to add jwt in pom.xml but jwt dependency is not available. Is there anyone who has the same experience? I'm going to use Jwtbuilder for security settings. Springboot is 2.2.6 and I'am using…
user13104402
  • 21
  • 1
  • 2
2
votes
1 answer

Failing to create a RS256 jwt key using jsonwebtoken

Im trying to create my JWT following this tutorial: https://developer.okta.com/blog/2018/10/31/jwts-with-java but when I change the SignatureAlgorithm from HS256 to RS 256 Im getting the following error: The signing key's algorithm 'SHA256withRSA'…
pelleg maimon
  • 23
  • 1
  • 3
2
votes
2 answers

Spring Security's permitAll Unauthorized

I want ignore all urls with HttpMethod.GET, and the Urls with Post,Delete,Put need be authenticated. My urls are "/api/manga","/api/grupos","/api/autor","/genero","/api/pagina","/api/capitulo" PermitAll dont work with JWTFilter, if a remove the…
Braian Silva
  • 1,986
  • 1
  • 15
  • 21
2
votes
0 answers

How to sign a JWT token for OAuth client credentials for Office 365 in Java / JJWT? "Client assertion contains an invalid signature"

I am following this guide to the client credentials flow and this guide to the JWT token needed. The ultimate objective is to access calendar information through the Microsoft Graph API. Calls to the Graph API need to be authenticated with an…
Jon Moore
  • 61
  • 3
2
votes
1 answer

how to create exceptions to JWT filter based on URLs

I am working on JWT authentication.I want to bypass ( not allow to pass through jwt filter), the provided URLs. Below is the code snippet. @Override protected void configure(HttpSecurity http) throws Exception { …
Ravi
  • 195
  • 3
  • 15
2
votes
0 answers

Java-JWT use public and private keys from string (Scala)

I'm building a server side application in scala which needs to create a JWT to communicate with a third party API. Due to dependency reasons, I am using the Java JWT Library as opposed to a Scala equivalent. The current infrastructure injects a…
Xandros
  • 727
  • 1
  • 9
  • 21
2
votes
1 answer

JJWT: How to parse claims correctly?

I made a test JWT using something like the following code String jwt = Jwts.builder() .setHeaderParam("typ", "jwt") .setId("myid") .setIssuer("ExampleIssuer") .setSubject("JohnDoe") …
aerojas
  • 103
  • 1
  • 1
  • 12
2
votes
1 answer

How to generate a RSAPublicKey to feed into JJWT RSA token validation

I'm validating a JWT token coming from Azure and use JJWT. I retrieve the modulus and exponent from the keys document related to my tid, which are fields n and e respectively. The validation fails with error: JWT signature does not match locally…
JB007
  • 123
  • 8
2
votes
2 answers

How to convert from io.jsonwebtoken.Claims to java.util.Map?

I am working with JWT token using io.jsonwebtoken maven dependency. I am able to create a JWT token with custom payloads successfully. Now while i am going to parse it, I need Map object which has all those custom payloads which…
Vishal Gajera
  • 4,137
  • 5
  • 28
  • 55
2
votes
3 answers

Firebase Custom Auth Error: The custom token format is incorrect

I am generating token using JJWT library like this - final String issuer = "my-app-auth-server@my-app-797ab.iam.gserviceaccount.com"; final String sub = "my-app-auth-server@my-app-797ab.iam.gserviceaccount.com"; final String aud =…
Devansh Kumar
  • 1,552
  • 1
  • 15
  • 27
2
votes
2 answers

jwt: Why is signature algorithm not needed when verifying a JWT token?

I'm reading the overview of the jjwt library: Building the token is done as following: import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; import io.jsonwebtoken.impl.crypto.MacProvider; import java.security.Key; // We need a…
Alexander Suraphel
  • 10,103
  • 10
  • 55
  • 90
1
vote
0 answers

Generate JWE (Encrypted JWT) using Json Web Token JJWT

I am trying to generate JWE using JJWT in Java. As per the documentation https://github.com/jwtk/jjwt#creating-a-jwe there has to be an encryptWith method in JwtBuilder class but I am not able to find it and I am using the latest available version…
Shashank Gupta
  • 321
  • 3
  • 15
1
vote
1 answer

Correct way to make secured CRUD API with spring security and JWT Tokens

I work on a CRUD API project using spring security framework and I want to implement authorization verification using JWT tokens. Let's say I have 3 endpoints: Authentication controller where user can sign up or sign in if he has an account A dummy…
Leo El
  • 13
  • 3
1 2
3
9 10