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.

Add Documentation on how the JWT profile works

See original GitHub issue

While running the back-end server. I am running into the following issue,

The following is the console output excerpt that is relevant to the issue,

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' thre
w exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jwtDecoder' defined in class path res
ource [org/dpppt/backend/sdk/ws/config/WSJWTConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanIns
tantiationException: Failed to instantiate [org.springframework.security.oauth2.jwt.JwtDecoder]: Factory method 'jwtDecoder' threw exception; nested exception
 is java.security.spec.InvalidKeySpecException: java.security.InvalidKeyException: Missing key encoding                                                       
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)                            
        at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651)                                            
        ... 29 common frames omitted                                                                                                                          
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jwtDecoder' defined in class path resource [org/dpppt/backe
nd/sdk/ws/config/WSJWTConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: F
ailed to instantiate [org.springframework.security.oauth2.jwt.JwtDecoder]: Factory method 'jwtDecoder' threw exception; nested exception is java.security.spec
.InvalidKeySpecException: java.security.InvalidKeyException: Missing key encoding            

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ubamreincommented, May 1, 2020

@cpepi001 On the develop branch are now both files

1reaction
jorgejams88commented, Apr 30, 2020

@cpepi001 Not that you shouldn’t, but you can avoid needing to set the key by changing the profile, if you want to use PostgreSQL as a database, you change the profile to this:

spring.profiles.active=prod

If you want to use HSQLDB, you change it to this:

spring.profiles.active=dev

Read more comments on GitHub >

github_iconTop Results From Across the Web

JSON Web Token Introduction - jwt.io
Learn about JSON Web Tokens, what are they, how they work, when and why you should use them.
Read more >
From Idea to Standard How the JWT Profile for OAuth 2.0 ...
I am taking this opportunity to give you a glimpse of how the standardization process works, but most importantly: I hope this will...
Read more >
JSON Web Token (JWT) Profile for OAuth 2.0 Access Tokens
This specification defines a profile for issuing OAuth 2.0 access tokens in JSON Web Token (JWT) format. Authorization servers and resource servers from ......
Read more >
JWT Profile for Authorization Grants | ReadyAPI Documentation
OAuth 2 Flow, Sets the OAuth 2.0 method to use. ; Access Token URL, The URL of the authorization server. ; JWT Assertion,...
Read more >
How to get an access token with JWT Grant
After your user grants permission, your app will be able to use the OAuth JWT Grant flow to impersonate them and make API...
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