Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#171772077] fix SAML env variables in config #598

Merged
merged 2 commits into from
Mar 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ export const CACHE_MAX_AGE_SECONDS: number = parseInt(

// Private key used in SAML authentication to a SPID IDP.
const samlKey = () => {
return fromNullable(process.env.SAML_KEY).getOrElse(
return fromNullable(process.env.SAML_KEY).getOrElseL(() =>
readFile(process.env.SAML_KEY_PATH || "./certs/key.pem", "SAML private key")
);
};
export const SAML_KEY = samlKey();

// Public certificate used in SAML authentication to a SPID IDP.
const samlCert = () => {
return fromNullable(process.env.SAML_CERT).getOrElse(
return fromNullable(process.env.SAML_CERT).getOrElseL(() =>
readFile(
process.env.SAML_CERT_PATH || "./certs/cert.pem",
"SAML certificate"
Expand Down