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
0
votes
0 answers

NoClassDefFoundError While Using Java Web Tokens

I am trying to understand the usage of java web tokens so I wanted to made a simple web application. I just create a simple login system which uses jwt but I got java.lang.NoClassDefFoundError: io/jsonwebtoken/Jwts in some point. Here is my related…
JollyRoger
  • 737
  • 1
  • 12
  • 38
0
votes
1 answer

JWT Authentication in Spring

I am new Spring Core and Spring Security as well, but currently I am solving task where I have to implement authentication over JWT. I do some research and I fount 2 solutions. Make authentication with Spring Security, with OAuth2 module Second…
Denis Stephanov
  • 4,563
  • 24
  • 78
  • 174
0
votes
0 answers

InvalidKeySpecException while trying to generate public key from pem file

I am trying to generate a RSAPublicKey from the publickey.pem file but it is throwing me exception . https://github.com/cerner/cds-hooks-sandbox/blob/master/ecpublickey.pem Invalid token :::java.security.spec.InvalidKeySpecException:…
vijay
  • 1
0
votes
1 answer

How do I use mscapi.RSAPrivateKey for JWT signing?

I'm not sure how to ask this but I'm trying to use various Json Web Token implementations from the web (whether is java-jwt or jjwt etc), they all takes in a RSAPrivateKey as part of their signing process. However the problem I have is that,…
codenamezero
  • 2,724
  • 29
  • 64
0
votes
1 answer

Sharing a JJWT Signature Between Web Services

I've successfully set up JJWT to be used in the authentication process across a series of web services. The problem is that they're created in one web service, but authenticated across multiple services. How can I successfully and safely use the…
Shawn
  • 513
  • 9
  • 18
0
votes
1 answer

java.lang.ClassNotFoundException: io.jsonwebtoken.Jwts when using JJWT JSON Web Token

When I am trying to use JJWT from Stormpath, it is throwing a run time Exception java.lang.ClassNotFoundException: io.jsonwebtoken.Jwts. I am using Jersey2 embedded on GlassFish 4.1; here is the code that is throwing the exception: private String…
temesgen
  • 47
  • 2
  • 10
0
votes
1 answer

JJWT getBody() removes double quotes

I'm parsing a JWT with jwsClaims.getBody() and the output I get looks like this: { iss=issuer, sub=joe@smith.net, roleName=user, companyName=company, iat=1493790315, exp=1494395115 } The output should be JSON but it is…
g3blv
  • 3,877
  • 7
  • 38
  • 51
0
votes
2 answers

JWT gets decoded easily on its site

I am working with JWT api , i have generated a token using: public void addAuthentication(HttpServletResponse response, String name) { // We generate a token now. String JWT = Jwts.builder() .setSubject(name) …
Darlyn
  • 4,715
  • 12
  • 40
  • 90
0
votes
0 answers

SignatureException while parsing correctly signed JJWT token retrieved from X-AUTH-TOKEN header of client request in Jersey request filter

I am trying to parse claims in a JJWT token that I retreive from X-AUTH-TOKEN header of a client request. The matter is that the parsing throws SignatureException, though the token is correctly signed. Here is my Jersey filter : @Provider public…
Doudou G.
  • 29
  • 7
0
votes
3 answers

Java jjwt creating invalid JSON for JWT

I must be missing something. I am using the JJWT library to create JWTs. The JWTs are created inconsistently from the library depending on the data set in the claims. My code: Date now = new Date(); Date expiration = new Date(now.getTime() +…
Niro
  • 776
  • 8
  • 15
0
votes
1 answer

Using JJWT causes "java.lang.SecurityException: Invalid signature file digest for Manifest main attributes"

Why am I getting a "java.lang.SecurityException: Invalid signature file digest for Manifest main attributes" error when using Java JSON Web Token (JJWT)? My code is (copied from https://github.com/jwtk/jjwt in its simplest form): Key key =…
ikevin8me
  • 4,253
  • 5
  • 44
  • 84
0
votes
1 answer

JJWT libary to generate token for authentication with Firebase on Android

I am trying to implement Linkedin Signin and then authenticate with Firebase. The only way to do so, since Linkedin is not in the current Firebase simple login providers is to: Login with Linkedin, grant the token as shown here. Get the Id of the…
angelos_lex
  • 1,593
  • 16
  • 24
0
votes
1 answer

authenticate spring boot app (using jwt) from android app

I am trying to authenticate a Spring Boot app (created using jHipster with jwt authentication) from an Android client. What will be a standard procedure to follow. Here are the steps I am trying to implement: Use Android form to capture user input…
Nayan
  • 235
  • 1
  • 3
  • 10
0
votes
1 answer

Generate token with RS256 and Jwts.builder().signWith() produces invalid signature

Using the JWT Java library and producing a token with the RS256 algorithm, I always get an invalid signature with the jwt.io debugger. Here is my example code, I tried to make it as simple as possible to start with my current project: // Create…
Tíbó
  • 1,188
  • 13
  • 28
0
votes
2 answers

JAX-RS Jersey servlet JJWT

I have a couple of days following a few issues but I can not find the solution . I have followed these issues: Custom JAX-RS authorization - using JWT in each request and Best practice for REST token-based authentication with JAX-RS and Jersey but…
Matias Blanco
  • 71
  • 3
  • 8
1 2 3
9
10