Membrane Backend: A centralized authentication service for Single Sign-On (SSO) enabling seamless token-based email verification across multiple client applications.
The endpoint, accessed via the '/validate_email' route, is designed to validate an email address provided in the request JSON data. It expects the request payload to be a JSON object with a field named 'email' containing the email address to validate. The validation process ensures that the email is both properly formatted and ends with one of the allowed domains: 'gc.ca', 'canada.ca', or 'inspection.gc.ca'.
Returns:
If the email is valid, the function responds with a JSON object containing the message 'Valid email address.' and a status code of 200.
If the email is invalid or missing in the request, the function responds with a JSON object containing the error message 'Invalid email address.' and a status code of 400.
Functionality:
The endpoint, accessed via the '/validate_email' route, is designed to validate an email address provided in the request JSON data. It expects the request payload to be a JSON object with a field named 'email' containing the email address to validate. The validation process ensures that the email is both properly formatted and ends with one of the allowed domains: 'gc.ca', 'canada.ca', or 'inspection.gc.ca'.
Returns:
If the email is valid, the function responds with a JSON object containing the message 'Valid email address.' and a status code of 200.
If the email is invalid or missing in the request, the function responds with a JSON object containing the error message 'Invalid email address.' and a status code of 400.