When designing and building resource endpoints, it is critical to verify the signature linked in the request headers to ensure that the request is coming from SSOfy.
Most web applications handle this in the middleware.
import { SignatureVerifier, SignatureGenerator } from "@ssofy/node-sdk";
...
const generator = new SignatureGenerator();
const validator = new SignatureVerifier(generator);
/**
* @type {boolean}
*/
const ok = validator.verifyBase64Signature(
url, // current route url started with http:// or https://
params, // array combination of form and query parameters
secret, // your SSOfy application's secret
signature // signature in headers
);