All guards inherit from this base class and adapts it for the particular scheme it implements. Additional schemes can be implemented as subclasses of this and will work transparently with fireproof.
Active bindings
nameThe name of the instance
open_apiAn OpenID compliant security scheme description
Methods
Method check_request()
A function that validates an incoming request, returning
TRUE if it is valid and FALSE if not. The base class simply returns
TRUE for all requests
Method reject_response()
Action to perform on the response in case the request fails to get validated by any instance in the flow. All failing instances will have this method called one by one so be mindful if you are overwriting information set by another instance
Method forbid_user()
Action to perform on the response in case the request does not have the necessary permissions for the endpoint. All succeeding instances will have this method called one by one if permissions are insufficient so be mindful if you are overwriting information set by another instance
Method register_handler()
Hook for registering endpoint handlers needed for this auth method
Arguments
add_handlerThe
add_handlermethod from Fireproof to be called for adding additional handlers