Class AuthSecurityException
Auth Security exception - used when SecurityComponent detects any issue with the current request
Property Summary
- 
        $_attributes protectedarrayArray of attributes that are passed in from the constructor, and made available in the view when a development error is displayed. 
- 
        $_messageTemplate protectedstringTemplate string that has attributes sprintf()'ed into it. 
- 
        $_reason protectedstringReason for request blackhole 
- 
        $_responseHeaders protectedarrayArray of headers to be passed to Cake\Network\Response::header() 
- 
        $_type protectedstringSecurity Exception type 
Method Summary
- 
          __construct() publicConstructor 
- 
          getAttributes() publicGet the passed in attributes 
- 
          getReason() publicGet Reason 
- 
          getType() publicGetter for type 
- 
          responseHeader() publicGet/set the response header to be used 
- 
          setMessage() publicSet Message 
- 
          setReason() publicSet Reason 
Method Detail
__construct() ¶ public
__construct(string|null $message = null, int $code = 400)Constructor
Parameters
- 
                string|null$message optional
- If no message is given 'Bad Request' will be the message 
- 
                int$code optional
- Status code, defaults to 400 
responseHeader() ¶ public
responseHeader(string|array|null $header = null, string|null $value = null): arrayGet/set the response header to be used
See also Cake\Network\Response::header()
Parameters
- 
                string|array|null$header optional
- An array of header strings or a single header string - an associative array of "header name" => "header value"
- an array of string headers is also accepted
 
- 
                string|null$value optional
- The header value. 
Returns
arraysetMessage() ¶ public
setMessage(string $message): voidSet Message
Parameters
- 
                string$message
- Exception message 
Returns
voidsetReason() ¶ public
setReason(string|null $reason = null): voidSet Reason
Parameters
- 
                string|null$reason optional
- Reason details 
Returns
void