Skip to content

Commit

Permalink
move optional variables out of the "required" section
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Jun 13, 2024
1 parent 6a9993b commit 1a1e348
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
5 changes: 2 additions & 3 deletions development/idp-local/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@

try {
// Required to be defined in environment variables
$ADMIN_EMAIL = Env::get('ADMIN_EMAIL', '[email protected]');
$ADMIN_PASS = Env::requireEnv('ADMIN_PASS');
$SECRET_SALT = Env::requireEnv('SECRET_SALT');
$IDP_NAME = Env::requireEnv('IDP_NAME');
$IDP_DISPLAY_NAME = Env::get('IDP_DISPLAY_NAME', $IDP_NAME);
} catch (EnvVarNotFoundException $e) {

// Return error response code/message to HTTP request.
Expand All @@ -41,9 +39,10 @@
exit($responseContent);
}


// Defaults provided if not defined in environment
$IDP_DISPLAY_NAME = Env::get('IDP_DISPLAY_NAME', $IDP_NAME);
$BASE_URL_PATH = Env::get('BASE_URL_PATH', '/');
$ADMIN_EMAIL = Env::get('ADMIN_EMAIL', '[email protected]');
$ADMIN_NAME = Env::get('ADMIN_NAME', 'SAML Admin');
$ADMIN_PROTECT_INDEX_PAGE = Env::get('ADMIN_PROTECT_INDEX_PAGE', true);
$SHOW_SAML_ERRORS = Env::get('SHOW_SAML_ERRORS', false);
Expand Down
5 changes: 2 additions & 3 deletions development/idp2-local/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@

try {
// Required to be defined in environment variables
$ADMIN_EMAIL = Env::get('ADMIN_EMAIL', '[email protected]');
$ADMIN_PASS = Env::requireEnv('ADMIN_PASS');
$SECRET_SALT = Env::requireEnv('SECRET_SALT');
$IDP_NAME = Env::requireEnv('IDP_NAME');
$IDP_DISPLAY_NAME = Env::get('IDP_DISPLAY_NAME', $IDP_NAME);
} catch (EnvVarNotFoundException $e) {

// Return error response code/message to HTTP request.
Expand All @@ -41,9 +39,10 @@
exit($responseContent);
}


// Defaults provided if not defined in environment
$IDP_DISPLAY_NAME = Env::get('IDP_DISPLAY_NAME', $IDP_NAME);
$BASE_URL_PATH = Env::get('BASE_URL_PATH', '/');
$ADMIN_EMAIL = Env::get('ADMIN_EMAIL', '[email protected]');
$ADMIN_NAME = Env::get('ADMIN_NAME', 'SAML Admin');
$ADMIN_PROTECT_INDEX_PAGE = Env::get('ADMIN_PROTECT_INDEX_PAGE', true);
$SHOW_SAML_ERRORS = Env::get('SHOW_SAML_ERRORS', false);
Expand Down
5 changes: 2 additions & 3 deletions dockerbuild/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@

try {
// Required to be defined in environment variables
$ADMIN_EMAIL = Env::get('ADMIN_EMAIL', '[email protected]');
$ADMIN_PASS = Env::requireEnv('ADMIN_PASS');
$SECRET_SALT = Env::requireEnv('SECRET_SALT');
$IDP_NAME = Env::requireEnv('IDP_NAME');
$IDP_DISPLAY_NAME = Env::get('IDP_DISPLAY_NAME', $IDP_NAME);
} catch (EnvVarNotFoundException $e) {

// Return error response code/message to HTTP request.
Expand All @@ -41,9 +39,10 @@
exit($responseContent);
}


// Defaults provided if not defined in environment
$IDP_DISPLAY_NAME = Env::get('IDP_DISPLAY_NAME', $IDP_NAME);
$BASE_URL_PATH = Env::get('BASE_URL_PATH', '/');
$ADMIN_EMAIL = Env::get('ADMIN_EMAIL', '[email protected]');
$ADMIN_NAME = Env::get('ADMIN_NAME', 'SAML Admin');
$ADMIN_PROTECT_INDEX_PAGE = Env::get('ADMIN_PROTECT_INDEX_PAGE', true);
$SHOW_SAML_ERRORS = Env::get('SHOW_SAML_ERRORS', false);
Expand Down

0 comments on commit 1a1e348

Please sign in to comment.