NAME

Catalyst::Plugin::OAuth2::AuthorizationServer::Error - a structured OAuth error

DESCRIPTION

Thrown by the engine and the plugin to signal an OAuth error. Attributes: error (required, the RFC error code string), error_description (optional), state and redirect_uri (optional, used by the authorize redirect-on-error path, RFC 6749 4.1.2.1, not the JSON body), http_status (default 400). to_response returns (\%body, $status) for direct rendering; the body carries only error + error_description.

METHODS

throw( error => $code, ... )

Construct and die a new instance.

to_response

Return the RFC envelope hashref and the HTTP status.