Expand description
Authentication errors that occur in the crate’s source code must be handled. Due to rusts limited capabilites to register / overwrite code from other traits some helper functions are provided to customize the error responses.
Functions§
- overwrite_
auth_ error_ message - Errors have a predfined text message that is returned in case an error occurs. This message can be overwritten by calling this function.
- overwrite_
auth_ error_ status_ code - Errors have a predfined HTTP-Status code that is returned in case an error occurs. This status code can be overwritten by calling this function. The status code must be in the range: 100 <= code <= 1000
- set_
auth_ error_ content_ type - Error responses return the content type header
text/html; charset=utf-8
by default. The header value can be overwritten by calling this function.