🔐 Security
- Introduction
- Validation methods
- isValidMethod
- isValidApiMethod
# Introduction
# Validation methods
To ensure the security of the validation process for requests originating from forms or APIs, Epaphrodites offers secure, flexible, and robust methods. These methods incorporate sophisticated filtering and verification mechanisms, such as server-side validation and input validation, to safeguard your data against potential attacks such as SQL injection or code injection attacks. Additionally, Epaphrodites provides ongoing support to keep these methods compliant with the latest security standards, regularly including updates and security patches.
isValidMethod
isValidMethod
is a function designed to validate the method originating from a form, taking into account two parameters: the allowed method (POST, GET, PUT, etc.) and the need to enforce token verification based on your project's requirements. This function is crucial for ensuring the security and integrity of operations performed within your application, ensuring that only authorized methods are used and that token authentication is applied when necessary.
if(isValidMethod(true , 'POST'))// default values are false and POST{}
isValidApiMethod
Unlike the previous method, isValidApiMethod
is used exclusively for APIs. This allows for a more specific and secure management of methods used within the context of programming interfaces, thereby enhancing the reliability and security of operations performed. Furthermore, this dedicated approach simplifies the development process by isolating the validation logic specific to APIs.
if(isValidApiMethod(true , 'POST'))// default values are false and POST{}