Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
13 changed files
with
683 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
/** | ||
* ApiSource plugin specific routes. | ||
* | ||
* Portions licensed to the University Corporation for Advanced Internet | ||
* Development, Inc. ("UCAID") under one or more contributor license agreements. | ||
* See the NOTICE file distributed with this work for additional information | ||
* regarding copyright ownership. | ||
* | ||
* UCAID licenses this file to you under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with the | ||
* License. You may obtain a copy of the License at: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* @link https://www.internet2.edu/comanage COmanage Project | ||
* @package registry-plugins | ||
* @since COmanage Registry v5.0.0 | ||
* @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) | ||
*/ | ||
|
||
use Cake\Routing\Route\DashedRoute; | ||
|
||
// In general, we're probably trying to set up API routes if we're doing | ||
// something within a plugin, but not necessarily. API routes are a subset | ||
// of Cake routes, so either can be specified here. | ||
|
||
// Core Enroller | ||
|
||
|
||
$routes->plugin( | ||
'CoreEnroller', | ||
['path' => '/core-enroller/'], | ||
function ($routes) { | ||
$routes->setRouteClass(DashedRoute::class); | ||
|
||
$routes->get( | ||
'email-verifiers/resend', | ||
[ | ||
'plugin' => 'CoreEnroller', | ||
'controller' => 'EmailVerifiers', | ||
'action' => 'resend', | ||
]) | ||
->setPass(['id']) | ||
->setPatterns(['id' => '[0-9]+']); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127 changes: 127 additions & 0 deletions
127
app/plugins/CoreEnroller/templates/element/emailVerifiers/list.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
<?php | ||
/** | ||
* COmanage Registry Email Verifiers Petition Fields | ||
* | ||
* Portions licensed to the University Corporation for Advanced Internet | ||
* Development, Inc. ("UCAID") under one or more contributor license agreements. | ||
* See the NOTICE file distributed with this work for additional information | ||
* regarding copyright ownership. | ||
* | ||
* UCAID licenses this file to you under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with the | ||
* License. You may obtain a copy of the License at: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* @link https://www.internet2.edu/comanage COmanage Project | ||
* @package registry | ||
* @since COmanage Registry v5.1.0 | ||
* @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) | ||
*/ | ||
|
||
declare(strict_types = 1); | ||
|
||
use CoreEnroller\Lib\Enum\VerificationModeEnum; | ||
use App\Lib\Util\StringUtilities; | ||
|
||
// Render the list of known email addresses and their verification statuses. | ||
// The configuration drives how many email addresses are required to complete this step. | ||
|
||
$title = ''; | ||
if($vv_all_done) { | ||
$title = __d('core_enroller', 'information.EmailVerifiers.done'); | ||
} else { | ||
$title = match ($vv_config->mode) { | ||
VerificationModeEnum::All => __d('core_enroller', 'information.EmailVerifiers.A'), | ||
VerificationModeEnum::None => __d('core_enroller', 'information.EmailVerifiers.0'), | ||
VerificationModeEnum::One => $vv_minimum_met | ||
? __d('core_enroller', 'information.EmailVerifiers.1.met') | ||
: __d('core_enroller', 'information.EmailVerifiers.1.none'), | ||
default => 'Unknown Verification Mode' // Optional fallback for unexpected cases | ||
}; | ||
|
||
} | ||
|
||
?> | ||
<p><?= $title ?></p> | ||
<table id="verifications-table" class="index-table list-mode"> | ||
<thead> | ||
<tr> | ||
<th><?= __d('controller', 'EmailAddresses', [1]) ?></th> | ||
<th><?= __d('field', 'status') ?></th> | ||
</tr> | ||
</thead> | ||
</tbody> | ||
|
||
<?php foreach(array_keys($vv_email_addresses) as $addr): ?> | ||
<?php | ||
$verified = isset($vv_verified_addresses[$addr]) && $vv_verified_addresses[$addr]; | ||
|
||
$button = ""; | ||
|
||
if(!$verified) { | ||
// We're already in a form here, so we need to use a GET URL to not mess things up. | ||
// This also means we need to manually insert the token and petition ID, which is | ||
// a bit duplicative with templates/Standard/dispatch.php | ||
|
||
$url = [ | ||
'plugin' => 'CoreEnroller', | ||
'controller' => 'email_verifiers', | ||
'action' => 'dispatch', | ||
$vv_config->id, | ||
'?' => [ | ||
'op' => 'verify', | ||
'petition_id' => $vv_petition->id, | ||
// We base64 encode the address partly to not have bare email addresses in URLs | ||
// and partly to avoid special characters (like dots) messing up the URL | ||
'm' => StringUtilities::urlbase64encode($addr) | ||
] | ||
]; | ||
|
||
if(isset($vv_token_ok) && $vv_token_ok && !empty($vv_petition->token)) { | ||
$url['?']['token'] = $vv_petition->token; | ||
} | ||
|
||
$materialIcon = '<em class="material-symbols" aria-hidden="true">check</em>'; | ||
$button = $this->Html->link( | ||
$materialIcon . ' ' . __d('operation', 'verify'), | ||
$url, | ||
[ | ||
'class' => 'btn btn-sm btn-tertiary float-end', | ||
'escape' => false, | ||
] | ||
); | ||
} | ||
?> | ||
|
||
<tr> | ||
<td><?= $addr ?></td> | ||
<td> | ||
<?php if($verified): ?> | ||
<?= __d('result', 'verified') ?> | ||
<?php else: ?> | ||
<span class="mr-1 badge bg-warning unverified"><?= __d('field', 'unverified')?></span> | ||
<?= $button; ?> | ||
<?php endif; ?> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
<?php | ||
|
||
if($vv_minimum_met || count($vv_email_addresses) === 0) { | ||
$this->Field->enableFormEditMode(); | ||
|
||
print $this->Form->hidden('op', ['default' => 'finish']); | ||
|
||
print $this->element('form/submit', ['label' => $vv_submit_button_label]); | ||
} | ||
?> | ||
<?php endforeach; ?> |
185 changes: 185 additions & 0 deletions
185
app/plugins/CoreEnroller/templates/element/emailVerifiers/resendLinkSpa.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
<?php | ||
/** | ||
* COmanage Registry Resend Confirmation Link Vue.js component | ||
* | ||
* Portions licensed to the University Corporation for Advanced Internet | ||
* Development, Inc. ("UCAID") under one or more contributor license agreements. | ||
* See the NOTICE file distributed with this work for additional information | ||
* regarding copyright ownership. | ||
* | ||
* UCAID licenses this file to you under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with the | ||
* License. You may obtain a copy of the License at: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* @link https://www.internet2.edu/comanage COmanage Project | ||
* @package registry | ||
* @since COmanage Registry v5.1.0 | ||
* @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) | ||
*/ | ||
|
||
|
||
declare(strict_types = 1); | ||
|
||
/* | ||
* Required: | ||
* - $htmlId | ||
* - $containerClasses | ||
* - $vv_config | ||
* - $m (encoded email) | ||
* - $petitionId | ||
* */ | ||
|
||
// Load my helper functions | ||
$vueHelper = $this->loadHelper('Vue'); | ||
|
||
$relativeUrl = "core-enroller/email-verifiers/resend/$vv_config->id" | ||
. '?' | ||
. "petition_id=$petitionId" | ||
. "&m=$emailAddress" | ||
|
||
?> | ||
|
||
<script type="module"> | ||
import MiniLoader from "<?= $this->Url->script('comanage/components/common/mini-loader.js')?>?time=<?= time() ?>"; | ||
|
||
const app = Vue.createApp({ | ||
data() { | ||
return { | ||
error: '', | ||
message: '', // Message to show (success or error) | ||
loading: false, // Loading state for the fetch request | ||
controller: null, // AbortController instance, | ||
txt: JSON.parse('<?= json_encode($vueHelper->locales()) ?>'), | ||
app: { | ||
coId: <?= $vv_cur_co->id ?>, | ||
types: <?= json_encode($types) ?>, | ||
cosettings: <?= json_encode($cosettings) ?> | ||
}, | ||
api: { | ||
webroot: '<?= $this->request->getAttribute('webroot') ?>', | ||
// co_id query parameter is required since it is the People's primary link | ||
resendCode: `<?= $this->request->getAttribute('webroot') . $relativeUrl ?>` | ||
}, | ||
txtPlugin: { | ||
'resendPreText': "<?= __d('core_enroller','information.EmailVerifiers.resend-pre-text') ?>", | ||
'resend': '<?= __d('core_enroller','information.EmailVerifiers.resend') ?>', | ||
'abort': '<?= __d('core_enroller','information.EmailVerifiers.abort') ?>', | ||
'sending': '<?= __d('core_enroller','information.EmailVerifiers.sending') ?>', | ||
'success': '<?= __d('core_enroller','information.EmailVerifiers.success') ?>', | ||
} | ||
} | ||
}, | ||
components: { | ||
MiniLoader | ||
}, | ||
methods: { | ||
async fetchData() { | ||
this.message = ""; // Clear any previous messages/errors | ||
this.error = ''; | ||
this.loading = true; // Set loading state to true | ||
|
||
// Create a new AbortController instance | ||
this.controller = new AbortController(); | ||
|
||
const apiUrl = this.api.resendCode; // Replace this URL with your API endpoint | ||
|
||
let request_init = { | ||
headers: new Headers({ | ||
'X-Requested-With': 'XMLHttpRequest', | ||
'Accept': 'application/json', | ||
}), | ||
method: 'GET', | ||
signal: this.controller.signal, | ||
} | ||
// AJAX Request | ||
let requestObj = new Request(apiUrl, request_init); | ||
|
||
try { | ||
// Perform the fetch request with signal | ||
const response = await fetch(requestObj); | ||
|
||
// Check if the response is successful | ||
if (!response.ok) { | ||
throw new Error(`Error: ${response.status} - ${response.statusText}`); | ||
} | ||
|
||
const data = await response.json(); | ||
this.message = this.txtPlugin.success; | ||
} catch (error) { | ||
// Handle fetch errors | ||
if (error.name === "AbortError") { | ||
// If fetch was aborted | ||
this.error = "Request aborted."; | ||
} else { | ||
this.error = `Request Failed: ${error.message}`; | ||
} | ||
} finally { | ||
this.loading = false; // Reset the loading state | ||
} | ||
}, | ||
abortRequest() { | ||
// Abort the ongoing fetch request, if any | ||
if (this.controller) { | ||
this.controller.abort(); | ||
this.controller = null; | ||
} | ||
}, | ||
}, | ||
computed: { | ||
getMiniLoaderClasses: function() { | ||
return "co-loading-mini-container d-inline ms-1" | ||
}, | ||
getAlertClasses: function() { | ||
if (this.error) { | ||
return "alert alert-danger alert-dismissible co-alert" | ||
} else if (this.message) { | ||
return "alert alert-success alert-dismissible co-alert" | ||
} else { | ||
return "alert alert-info alert-dismissible co-alert" | ||
} | ||
} | ||
}, | ||
template: ` | ||
<!-- Display Success or Error Message --> | ||
<div v-if="message || error" class="alert-container mb-3" id="flash-messages"> | ||
<div :class="getAlertClasses" role="alert"> | ||
<div class="alert-body d-flex align-items-center"> | ||
<span class="alert-title d-flex align-items-center"> | ||
<span v-if="error" class="material-symbols-outlined alert-icon">report_problem</span> | ||
<span v-if="message" class="material-symbols-outlined alert-icon">check_circle</span> | ||
</span> | ||
<span v-if="error" class="alert-message">{{ error }}</span> | ||
<span v-if="message" class="alert-message">{{ message }}</span> | ||
<span class="alert-button"> | ||
<button type="button" class="btn-close nospin" data-bs-dismiss="alert" aria-label="Close"></button> | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
<div v-if="!loading"> | ||
<span class="me-1">{{ txtPlugin.resendPreText }}</span> | ||
<a href="#" class="spin" @click="fetchData">{{ txtPlugin.resend }}</a> | ||
</div> | ||
<div v-if="loading"> | ||
<span class="me-1">{{ txtPlugin.sending }}</span> | ||
<MiniLoader :isLoading="loading" :classes="getMiniLoaderClasses"/> | ||
</div> | ||
` | ||
}); | ||
|
||
|
||
app.use(primevue.config.default, {unstyled: true}); | ||
|
||
// Mount the component and provide a global reference for this app instance. | ||
window.<?= str_replace('-', '', $htmlId) ?> = app.mount("#<?= $htmlId ?>-container"); | ||
</script> | ||
|
||
<div id="<?= $htmlId ?>-container" class="<?= $containerClasses ?>"></div> |
91 changes: 91 additions & 0 deletions
91
app/plugins/CoreEnroller/templates/element/emailVerifiers/verify.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<?php | ||
/** | ||
* COmanage Registry Verify Email | ||
* | ||
* Portions licensed to the University Corporation for Advanced Internet | ||
* Development, Inc. ("UCAID") under one or more contributor license agreements. | ||
* See the NOTICE file distributed with this work for additional information | ||
* regarding copyright ownership. | ||
* | ||
* UCAID licenses this file to you under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with the | ||
* License. You may obtain a copy of the License at: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* @link https://www.internet2.edu/comanage COmanage Project | ||
* @package registry | ||
* @since COmanage Registry v5.1.0 | ||
* @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) | ||
*/ | ||
|
||
declare(strict_types = 1); | ||
|
||
use App\Lib\Util\StringUtilities; | ||
|
||
if(empty($vv_verify_address)) { | ||
print __d('core_enroller', 'information.EmailVerifiers.done'); | ||
return; | ||
} | ||
|
||
// Render a form prompting for the code that was sent to the Enrollee | ||
|
||
print __d('core_enroller', 'information.EmailVerifiers.code_sent', [$vv_verify_address]); | ||
|
||
$this->Field->enableFormEditMode(); | ||
|
||
$m = StringUtilities::urlbase64encode($vv_verify_address); | ||
|
||
print $this->Form->hidden('op', ['default' => 'verify']); | ||
print $this->Form->hidden('co_id', ['default' => $vv_cur_co->id]); | ||
print $this->Form->hidden('m', ['default' => $m]); | ||
|
||
print $this->element('form/listItem', [ | ||
'arguments' => [ | ||
'fieldName' => 'code', | ||
'fieldLabel' => "Code", //__d('field', 'mail') | ||
'fieldOptions' => [ | ||
'required' => true | ||
] | ||
]]); | ||
|
||
$resendLink = $this->Html->link( | ||
__d('core_enroller', 'Resend'), | ||
['controller' => 'email_verifiers', 'action' => 'resend', $vv_verify_address], | ||
['class' => 'text-primary'] | ||
); | ||
|
||
?> | ||
<?php if($this->Field->isEditable()): ?> | ||
<li class="fields-submit"> | ||
<div class="field"> | ||
<div class="field-name"> | ||
<span class="required">* <?= __d('field', 'required') ?></span> | ||
</div> | ||
<div class="field-info"> | ||
<?= $this->Form->submit($vv_submit_button_label) ?> | ||
<?php if(!empty($vv_include_cancel)): ?> | ||
<button type="button" onclick="history.back()" class="btn btn-cancel"> | ||
<?= __d('operation','cancel') ?> | ||
</button> | ||
<?php endif; ?> | ||
</div> | ||
</div> | ||
</li> | ||
<?php endif; ?> | ||
|
||
<!-- Resend Link - SPA module --> | ||
<?= $this->element('CoreEnroller.emailVerifiers/resendLinkSpa', [ | ||
'htmlId' => 'resend-link', | ||
'petitionId' => $vv_petition->id, | ||
'containerClasses' => 'border-top border-1 pt-2 text-center text-muted', | ||
'emailAddress' => $m, | ||
'vv_config' => $vv_config, | ||
]) ?> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<?php | ||
|
||
/** | ||
* COmanage Registry HTTP Statis Codes Enum | ||
* | ||
* Portions licensed to the University Corporation for Advanced Internet | ||
* Development, Inc. ("UCAID") under one or more contributor license agreements. | ||
* See the NOTICE file distributed with this work for additional information | ||
* regarding copyright ownership. | ||
* | ||
* UCAID licenses this file to you under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with the | ||
* License. You may obtain a copy of the License at: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* @link https://www.internet2.edu/comanage COmanage Project | ||
* @package registry | ||
* @since COmanage Registry v5.1.0 | ||
* @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) | ||
*/ | ||
|
||
declare(strict_types = 1); | ||
|
||
namespace App\Lib\Enum; | ||
|
||
// XXX [REF]https://httpstatuses.com | ||
class HttpStatusCodesEnum extends StandardEnum | ||
{ | ||
// [Informational 1xx] | ||
const HTTP_CONTINUE = 100; | ||
const HTTP_SWITCHING_PROTOCOLS = 101; | ||
|
||
// [Successful 2xx] | ||
const HTTP_OK = 200; | ||
const HTTP_CREATED = 201; | ||
const HTTP_ACCEPTED = 202; | ||
const HTTP_NONAUTHORITATIVE_INFORMATION = 203; | ||
const HTTP_NO_CONTENT = 204; | ||
const HTTP_RESET_CONTENT = 205; | ||
const HTTP_PARTIAL_CONTENT = 206; | ||
|
||
// [Redirection 3xx] | ||
const HTTP_MULTIPLE_CHOICES = 300; | ||
const HTTP_MOVED_PERMANENTLY = 301; | ||
const HTTP_FOUND = 302; | ||
const HTTP_SEE_OTHER = 303; | ||
const HTTP_NOT_MODIFIED = 304; | ||
const HTTP_USE_PROXY = 305; | ||
const HTTP_UNUSED = 306; | ||
const HTTP_TEMPORARY_REDIRECT = 307; | ||
|
||
// [Client Error 4xx] | ||
const errorCodesBeginAt = 400; | ||
const HTTP_BAD_REQUEST = 400; | ||
const HTTP_UNAUTHORIZED = 401; | ||
const HTTP_PAYMENT_REQUIRED = 402; | ||
const HTTP_FORBIDDEN = 403; | ||
const HTTP_NOT_FOUND = 404; | ||
const HTTP_METHOD_NOT_ALLOWED = 405; | ||
const HTTP_NOT_ACCEPTABLE = 406; | ||
const HTTP_PROXY_AUTHENTICATION_REQUIRED = 407; | ||
const HTTP_REQUEST_TIMEOUT = 408; | ||
const HTTP_CONFLICT = 409; | ||
const HTTP_GONE = 410; | ||
const HTTP_LENGTH_REQUIRED = 411; | ||
const HTTP_PRECONDITION_FAILED = 412; | ||
const HTTP_REQUEST_ENTITY_TOO_LARGE = 413; | ||
const HTTP_REQUEST_URI_TOO_LONG = 414; | ||
const HTTP_UNSUPPORTED_MEDIA_TYPE = 415; | ||
const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416; | ||
const HTTP_EXPECTATION_FAILED = 417; | ||
|
||
// [Server Error 5xx] | ||
const HTTP_INTERNAL_SERVER_ERROR = 500; | ||
const HTTP_NOT_IMPLEMENTED = 501; | ||
const HTTP_BAD_GATEWAY = 502; | ||
const HTTP_SERVICE_UNAVAILABLE = 503; | ||
const HTTP_GATEWAY_TIMEOUT = 504; | ||
const HTTP_VERSION_NOT_SUPPORTED = 505; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters