Messages
in package
This class lists down all of our messages to be shown to the admin or in the frontend. This is a constant file listing down all of our constants. Has a parse function to parse and replace any dynamic values needed to be inputed in the string. Key is usually of the form {{key}}
Table of Contents
- CURL_ERROR = 'ERROR: <a href="http://php.net/manual/en/curl.installation.php" target="_blank">PHP cURL extension</a> is not installed or disabled. Query submit failed.'
- ERROR_OCCURRED = 'An error occured while processing your request. Please try again.'
- FORMATTED_CERT = "<pre>{{cert}}</pre>"
- IDP_DELETED = 'Identity Provider settings deleted successfully.'
- INVALID_AUDIENCE = 'Invalid audience URI. Expected {{expect}}, found {{found}}'
- INVALID_CERTIFICATE_FORMAT = "The x509 certificate configured in the connector is not in the correct format"
- INVALID_DESTINATION = 'Destination in response doesn't match the current URL. Destination is {{destination}}, current URL is {{currenturl}}.'
- INVALID_IDP = '<strong>INVALID_IDP: </strong>No Identity Provider configuration found. Please configure your Identity Provider.<br/>'
- INVALID_INSTANT = '<strong>INVALID_REQUEST: </strong>Request time is greater than the current time.<br/>'
- INVALID_ISSUER = 'IDP Entity ID mismatch. <strong>Please configure {{found}} as Entity ID at <a href="{{http-host}}">SAML Settings</a></strong>'
- INVALID_LICENSE = 'Invalid domain or credentials.'
- INVALID_NO_OF_NAMEIDS = 'More than one <saml:NameID> or <saml:EncryptedD> in <saml:Subject>.'
- INVALID_RESPONSE_SIGNATURE = '<strong>INVALID_SIGNATURE: Configure your X-509 Certificate at <a href="{{http-host}}">SAML Settings</a> to be the one shown below and please try again.</strong><br><p class="error-cert">-----BEGIN CERTIFICATE-----<br>{{cert}}<br>-----END CERTIFICATE-----</p>'
- INVALID_SAML_VERSION = 'We only support SAML 2.0! Please send a SAML 2.0 request.<br/>'
- INVALID_STATUS_CODE = '<strong>INVALID_STATUS_CODE: </strong> The Identity Provider returned an Invalid response. Identity Provider has sent {{statuscode}} status code in SAML Response. Please check with your Identity Provider for more information.'
- ISSUER_EXISTS = 'You seem to already have an Identity Provider for that issuer configured under : <i>{{name}}</i>'
- MISSING_ATTRIBUTES_EXCEPTION = 'SAML Response doesn't have the necessary attributes to log the user in'
- MISSING_ID_FROM_RESPONSE = 'Missing ID attribute on SAML assertion.'
- MISSING_ISSUER_VALUE = 'Missing <saml:Issuer> in assertion.'
- MISSING_NAMEID = 'Missing <saml:NameID> or <saml:EncryptedID> in <saml:Subject>.'
- MISSING_SAML_RESPONSE = 'No Valid Response Found'
- NO_IDP_CONFIG = 'Please check and make sure your <a href=setup.php>Plugin Settings</a> are configured properly.'
- SAML_INVALID_OPERATION = '<strong>INVALID_OPERATION: </strong>Invalid Operation! Please contact your site administrator.<br/>'
- SAML_RESPONSE = "<pre>{{xml}}</pre>"
- SETTINGS_SAVED = 'Settings saved successfully.'
- SP_ENTITY_ID_CHANGED = 'SP Entity ID changed successfully.'
- SP_ENTITY_ID_NULL = 'SP EntityID/Issuer cannot be NULL.'
- parse() : mixed
- Parse the message
Constants
CURL_ERROR
public
mixed
CURL_ERROR
= 'ERROR: <a href="http://php.net/manual/en/curl.installation.php" target="_blank">PHP cURL extension</a>
is not installed or disabled. Query submit failed.'
ERROR_OCCURRED
public
mixed
ERROR_OCCURRED
= 'An error occured while processing your request. Please try again.'
FORMATTED_CERT
public
mixed
FORMATTED_CERT
= "<pre>{{cert}}</pre>"
IDP_DELETED
public
mixed
IDP_DELETED
= 'Identity Provider settings deleted successfully.'
INVALID_AUDIENCE
public
mixed
INVALID_AUDIENCE
= 'Invalid audience URI. Expected {{expect}}, found {{found}}'
INVALID_CERTIFICATE_FORMAT
public
mixed
INVALID_CERTIFICATE_FORMAT
= "The x509 certificate configured in the connector is not in the correct format"
INVALID_DESTINATION
public
mixed
INVALID_DESTINATION
= 'Destination in response doesn't match the current URL. Destination is {{destination}},
current URL is {{currenturl}}.'
INVALID_IDP
public
mixed
INVALID_IDP
= '<strong>INVALID_IDP: </strong>No Identity Provider configuration found. Please configure your
Identity Provider.<br/>'
INVALID_INSTANT
public
mixed
INVALID_INSTANT
= '<strong>INVALID_REQUEST: </strong>Request time is greater than the current time.<br/>'
INVALID_ISSUER
public
mixed
INVALID_ISSUER
= 'IDP Entity ID mismatch. <strong>Please configure {{found}} as Entity ID at <a href="{{http-host}}">SAML Settings</a></strong>'
INVALID_LICENSE
public
mixed
INVALID_LICENSE
= 'Invalid domain or credentials.'
INVALID_NO_OF_NAMEIDS
public
mixed
INVALID_NO_OF_NAMEIDS
= 'More than one <saml:NameID> or <saml:EncryptedD> in <saml:Subject>.'
INVALID_RESPONSE_SIGNATURE
public
mixed
INVALID_RESPONSE_SIGNATURE
= '<strong>INVALID_SIGNATURE: Configure your X-509 Certificate at <a href="{{http-host}}">SAML Settings</a> to be the one shown below and please try again.</strong><br><p class="error-cert">-----BEGIN CERTIFICATE-----<br>{{cert}}<br>-----END CERTIFICATE-----</p>'
INVALID_SAML_VERSION
public
mixed
INVALID_SAML_VERSION
= 'We only support SAML 2.0! Please send a SAML 2.0 request.<br/>'
INVALID_STATUS_CODE
public
mixed
INVALID_STATUS_CODE
= '<strong>INVALID_STATUS_CODE: </strong> The Identity Provider returned an Invalid response.
Identity Provider has sent {{statuscode}} status code in SAML Response.
Please check with your Identity Provider for more information.'
ISSUER_EXISTS
public
mixed
ISSUER_EXISTS
= 'You seem to already have an Identity Provider for that issuer configured under : <i>{{name}}</i>'
MISSING_ATTRIBUTES_EXCEPTION
public
mixed
MISSING_ATTRIBUTES_EXCEPTION
= 'SAML Response doesn't have the necessary attributes to log the user in'
MISSING_ID_FROM_RESPONSE
public
mixed
MISSING_ID_FROM_RESPONSE
= 'Missing ID attribute on SAML assertion.'
MISSING_ISSUER_VALUE
public
mixed
MISSING_ISSUER_VALUE
= 'Missing <saml:Issuer> in assertion.'
MISSING_NAMEID
public
mixed
MISSING_NAMEID
= 'Missing <saml:NameID> or <saml:EncryptedID> in <saml:Subject>.'
MISSING_SAML_RESPONSE
public
mixed
MISSING_SAML_RESPONSE
= 'No Valid Response Found'
NO_IDP_CONFIG
public
mixed
NO_IDP_CONFIG
= 'Please check and make sure your <a href=setup.php>Plugin Settings</a> are configured properly.'
SAML_INVALID_OPERATION
public
mixed
SAML_INVALID_OPERATION
= '<strong>INVALID_OPERATION: </strong>Invalid Operation! Please contact your site administrator.<br/>'
SAML_RESPONSE
public
mixed
SAML_RESPONSE
= "<pre>{{xml}}</pre>"
SETTINGS_SAVED
public
mixed
SETTINGS_SAVED
= 'Settings saved successfully.'
SP_ENTITY_ID_CHANGED
public
mixed
SP_ENTITY_ID_CHANGED
= 'SP Entity ID changed successfully.'
SP_ENTITY_ID_NULL
public
mixed
SP_ENTITY_ID_NULL
= 'SP EntityID/Issuer cannot be NULL.'
Methods
parse()
Parse the message
public
static parse( $message[, array<string|int, mixed> $data = array() ]) : mixed