new page for client error (too many requests).. work in progress

This commit is contained in:
2025-12-01 22:47:36 -05:00
parent 5ebfad604f
commit 3bb2d9cecd
3 changed files with 89 additions and 4 deletions
+31 -4
View File
@@ -8,21 +8,24 @@ class Env {
* @return string returns title of this system
*/
public function getTitle(): string {
return getenv('PREAUTH_TITLE') ?: 'Pre-Authentication System';
return getenv('PREAUTH_TITLE')
?: 'Pre-Authentication System';
}
/**
* @return string returns background-color of this system
*/
public function getColor(): string {
return getenv('PREAUTH_BACKGROUND') ?: '#029386'; // teal
// defaults to teal
return getenv('PREAUTH_BACKGROUND') ?: '#029386';
}
/**
* @return string returns text-color of this system
*/
public function getTextColor(): string {
return getenv('PREAUTH_FOREGROUND') ?: '#ffffff'; // white
// defaults to white
return getenv('PREAUTH_FOREGROUND') ?: '#ffffff';
}
/**
@@ -36,7 +39,8 @@ class Env {
* @return string returns the name of the Token field
*/
public function getTokenName(): string {
return getenv('PREAUTH_TOKEN_NAME') ?: 'Authentication Token';
return getenv('PREAUTH_TOKEN_NAME')
?: 'Authentication Token';
}
/**
@@ -45,5 +49,28 @@ class Env {
public function getSubmitName(): string {
return getenv('PREAUTH_SUBMIT_NAME') ?: 'Submit';
}
/**
* @return string returns the denied http status code
*/
public function getDeniedCode(): string {
return getenv('PREAUTH_DENIED_CODE') ?: '418';
}
/**
* @return string returns the denied response title
*/
public function getDeniedTitle(): string {
return getenv('PREAUTH_DENIED_TITLE')
?: "I'm a teapot";
}
/**
* @return string returns the denied response message
*/
public function getDeniedMessage(): string {
return getenv('PREAUTH_DENIED_MESSAGE')
?: 'I refuse to brew coffee.';
}
}