Git Product home page Git Product logo

Comments (7)

bdemers avatar bdemers commented on June 16, 2024 1

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.

Robson96 avatar Robson96 commented on June 16, 2024 1

I think you just need to update the documentation, the sample codes!

And now after your tip my code worked!
Thanks!

from jpaseto.

bdemers avatar bdemers commented on June 16, 2024

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.

Robson96 avatar Robson96 commented on June 16, 2024

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.

Robson96 avatar Robson96 commented on June 16, 2024

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.

Robson96 avatar Robson96 commented on June 16, 2024

here on github and an article that I think you wrote!

https://blog.bdemers.io/categories/jpaseto/

from jpaseto.

Robson96 avatar Robson96 commented on June 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.