Installed Package Types
Encoded JWT
Decode the JWT
Explanation of the Decoded JWT
Upgrade SSO Claim Version
AppExchange Partners, Upgrade SSO Claim v2
List Your App in AppExchange
You application login page needs to decode the JWT passed to it and leverage the information as needed. You need two pieces of information to decode the JWT:
encodedJWT = The JWT passed to the page.secret = The JWT signing secret key for your application used to decode the endcoded JWT. This value is stored on the installed package.Check out our downloadable SDKs to see coding examples in a variety of languages. Below are examples of just the JWT decoding piece, leveraging external libraries referenced in the Resources section below.
1using JWT; // install from https://github.com/johnsheehan/jwt
2using Newtonsoft.Json.Linq;
3
4namespace Example
5{
6 public class ExampleClass
7 {
8 string encodedJWT = "jwttokengoeshere";
9 string secret = "mysecret";
10 string decodedJWT = JWT.JsonWebToken.Decode(encodedJWT, secret);
11 JObject parsedJWT = JObject.Parse(decodedJWT);
12 }
13}1var jwt = require("jwt-simple"); // install with: 'npm install jwt-simple'
2var encodedJWT = "jwttokengoeshere";
3var secret = "mysecret";
4var decodedJWT = jwt.decode(encodedJWT, secret);1<?php
2require_once 'JWT.php'; // install from https://github.com/luciferous/jwt
3$encodedJWT = 'jwttokengoeshere';
4$secret = 'mysecret';
5$decodedJWT = JWT::decode($encodedJWT, $secret);
6?>1require "jwt"
2@encodedJWT = 'jwttokengoeshere';
3@secret = 'mysecret';
4@decodedJWT = JWT.decode(@encodedJWT.to_s,nil,@secret)