TokenMismatchException class
Thrown by CsrfMiddleware when the CSRF token of a request is missing or wrong. Dox answers with 419.
- Inheritance
-
- Object
- IHttpException
- TokenMismatchException
Constructors
- TokenMismatchException({dynamic message = 'CSRF token mismatch', String errorCode = 'csrf_token_mismatch', int code = 419})
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toResponse(
) → dynamic -
the JSON body of the error answer:
{"code": "not_found", "message": "Not Found"}. aMapmessage is sent as it is, so validation errors and custom JSON keep their own shape.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited