Questions tagged [paseto]

14 questions
7
votes
1 answer

Generate a Paseto V2 Public Key/Token in PHP, Verify in Node.js

Preface: What is Paseto?: https://developer.okta.com/blog/2019/10/17/a-thorough-introduction-to-paseto I am using the PHP library for Paseto from here I am using the Node.js Paseto lib from here I have been able to successfully achieve the…
Woodrow
  • 2,740
  • 1
  • 14
  • 18
1
vote
1 answer

PASETO token signature is not valid but the private and public key match

I'm using https://www.nuget.org/packages/Paseto.Core/ and this is how I generate the PASETO token: public async Task GenerateAsync(Client client, TokenRequest tokenRequest, string issuer, string audience) { var…
Szyszka947
  • 473
  • 2
  • 5
  • 21
1
vote
1 answer

Why is JWE better than just encrypting content/payload with RSA/AES?

We want to use token for some services (which we own and develop) and we are considering to implement JWE or Paseto. Token and payload should be encrypted (some string or json). What is benefit of using JWE or something rather than just encrypting…
rkj
  • 784
  • 1
  • 8
  • 19
1
vote
1 answer

NodeJS Paseto Key: Unable to read the generated secret key

I'm using the paseto npm package for generating a secret key and further using that key to create a token. I might be going wrong with understanding something here, how do I store the key generated? The following is the…
1
vote
0 answers

Paseto example with Graphql(Lighthouse Laravel)

I am looking for a paseto example with Graphql(Lighthouse Laravel) or how to create paseto's for each resource using the user roles and types. Or how to restrict access to only specific resources. I only found this: Paseto presentation Okta Paseto…
itwolfpower
  • 306
  • 3
  • 11
0
votes
0 answers

Handling expiration date of PASETO access token received from backend in React.js

I'm working on a React.js project where the backend server is issuing PASETO (Platform-Agnostic Security Tokens) access tokens for authentication. I need to handle the expiration of these tokens on the client-side. The tokens contain an expiration…
0
votes
0 answers

PHP Paseto V3 generated local token not working in NodeJS

I have PHP application that uses ParagonIE/Paseto v3 library generation token for auth. NOw I am building new server on Nodejs and using paseto plugin, but token generated by PHP is invalid in Nodejs and versa. I am using symmetric key for…
0
votes
0 answers

I'm having trouble generating a token with the jpaseto library using V2.PUBLIC

I am trying to utilize the jpaseto library and when I run the following code, I get this error: dev.paseto.jpaseto.PasetoKeyException: Failed to generate Ed25519 key pair The exception is thrown on the second line. KeyPair keyPair =…
Lorne
  • 79
  • 1
  • 9
0
votes
1 answer

How to convert a PASERK string to a crypto.KeyObject?

I have a PASERK key like k4.secret.5xxxxxxxpA How can I obtain a crypto.KeyObject from that string?
RubenLaguna
  • 21,435
  • 13
  • 113
  • 151
0
votes
1 answer

Paseto V3 Node.js - Local Secret Key must be 32 bytes long symmetric key Error

My secret key was generated using PHP Paseto V3 with openssl_random_pseudo_bytes(32) and then converted from bin to hex. Now I need to decrypt and verify Paseto token using node.js and paseto library (https://github.com/panva/paseto). I don't…
Jacobino
  • 1
  • 2
0
votes
1 answer

Creating public PASETO token in ASP NET Core

I'm using Paseto.Core Nuget from https://github.com/daviddesmet/paseto-dotnet, and I'm trying to create v4 public PASETO token with this. My code: public async Task GenerateAsync(Client client, TokenRequest tokenRequest, string…
Szyszka947
  • 473
  • 2
  • 5
  • 21
0
votes
1 answer

Need help verifying PASETO-tokens validity in JavaScript. Currently have flaky behaviour dependant on payload

I'm trying to test out PASETO-tokens and I have a problem where I cannot verify my tokens validity properly in the frontend. As I haven't found any browser implementation for checking the signature I've had to do this myself, using…
0
votes
1 answer

JPaseto token creation takes 2min

I have tried to run https://github.com/oktadeveloper/okta-jpaseto-example which works fine but the code for creating a token takes 2min+ and some runs have been 7min I have also followed the video https://www.youtube.com/watch?v=aOyG68jvthM which…
-1
votes
1 answer

How can i get the issuer or footer or any additional data in GO paseto v2(public)

func GetToken(user int) (string, error) { v2 := paseto.NewV2() b, _ := hex.DecodeString(PrivateKey) privateKey := ed25519.PrivateKey(b) jsonToken := paseto.JSONToken{ Expiration: time.Now().Add(24 * time.Hour), …