mocksaml/lib/env.ts
Kiran K 9bc55ea7f0
Validate AuthnRequest signature (#11)
* Validate AuthnRequest signature skelton

* Code refactor: Move the base64decode to common method

* wip

* Add signature validation

* Read the keys from config

* Lock dep version

Co-authored-by: Deepak Prabhakara <deepak@boxyhq.com>
2022-03-02 21:06:04 +00:00

18 lines
419 B
TypeScript

import { fetchPrivateKey, fetchPublicKey } from 'utils';
const appUrl = process.env.APP_URL || 'http://localhost:4000';
const entityId = process.env.ENTITY_ID || 'https://saml.example.com/entityid';
const ssoUrl = `${appUrl}/api/saml/sso`;
const privateKey = fetchPrivateKey();
const publicKey = fetchPublicKey();
const config = {
appUrl,
entityId,
ssoUrl,
privateKey,
publicKey,
};
export default config;