Hi,
Can anyone help me to understand if we can generate JWT token without using Adobe I/O.
If possible what is the API link and the parameters required to be passed.
If there is any document that could help
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Here is our official JWT documentation which also includes sample code for JWT generation
https://www.adobe.io/authentication/auth-methods.html#!AdobeDocs/adobeio-auth/master/JWT/JWT.md
Views
Replies
Total Likes
'use strict'; const fs = require('fs'); const jwt = require('jsonwebtoken'); var expiry = Date.now() + 86400000 ; var jwtPayload = { "exp":expiry, "iss":"<org id>", "sub":"<email>", "https://ims-na1.adobelogin.com/s/ent_audiencemanagerplatform_sdk":true, "aud":"https://ims-na1.adobelogin.com/c/890bbe...." }; var privateKey = fs.readFileSync("../aam-api/secret.pem"); jwt.sign(jwtPayload, privateKey, { algorithm: 'RS256' }, function(err, token) { console.log(token); return token; });