Comments (7)
Ahh, I think I see the issue.
If you create key pair before initializing the Paseto Builder/Parser then Bouncy Castle isn't initialized yet.
The quick work around is add Security.addProvider(new BouncyCastleProvider());
before you call Keys.keyPairFor
We'll get this fixed. Which tutorial are you using and I'll double-check that too
from jpaseto.
I think you just need to update the documentation, the sample codes!
And now after your tip my code worked!
Thanks!
from jpaseto.
Are you using Java 8? If so you will need to include Bouncy Castle as a dependency (or you could use Java 11+)
https://github.com/paseto-toolkit/jpaseto#paseto-format-support
If that doesn't help, let me know what OS and Java version you are using, and I'll take a look
from jpaseto.
openjdk 11.0.10 2021-01-19
OpenJDK Runtime Environment GraalVM CE 21.0.0 (build 11.0.10+8-jvmci-21.0-b06)
OpenJDK 64-Bit Server VM GraalVM CE 21.0.0 (build 11.0.10+8-jvmci-21.0-b06, mixed mode, sharing)
openSUSE Tumbleweed 64 bits
pom.xml
<dependency>
<groupId>dev.paseto</groupId>
<artifactId>jpaseto-api</artifactId>
<version>0.6.0</version>
</dependency>
<dependency>
<groupId>dev.paseto</groupId>
<artifactId>jpaseto-impl</artifactId>
<version>0.6.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>dev.paseto</groupId>
<artifactId>jpaseto-jackson</artifactId>
<version>0.6.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>dev.paseto</groupId>
<artifactId>jpaseto-bouncy-castle</artifactId>
<version>0.6.0</version>
</dependency>
<dependency>
<groupId>dev.paseto</groupId>
<artifactId>jpaseto-sodium</artifactId>
<version>0.6.0</version>
</dependency>
from jpaseto.
I also installed libsodium natively, but I tried to follow the tutorial to get a public v2 token, but I found it a bit outdated or confusing!
from jpaseto.
here on github and an article that I think you wrote!
https://blog.bdemers.io/categories/jpaseto/
from jpaseto.
you say you have to have libsodium, but you install it automatically
https://github.com/paseto-toolkit/jpaseto/blob/main/src/ci/libsodium.sh
but there is a dependency on libsodium, you don't understand
from jpaseto.
Related Issues (9)
- Can't run jpaseto artifact in ubuntu server HOT 3
- java.lang.SecurityException: JVM does not provide a strong secure random number generator HOT 2
- Cast Exception in String to Paseto HOT 5
- Can't use KeyResolver with DefaultPasetoParserBuilder HOT 5
- PASETO Versions 3 and 4
- Support PASERK: Platform-Agnostic Serialized Keys HOT 3
- Use Official Paseto Test Vectors HOT 1
- Long Time Taken for Token Creation HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jpaseto.