Method: OAuth2::Provider::Rack::Responses.json_error
- Defined in:
- lib/oauth2/provider/rack/responses.rb
.json_error(error, options = {}) ⇒ Object
14 15 16 17 |
# File 'lib/oauth2/provider/rack/responses.rb', line 14 def self.json_error(error, = {}) description = %{, "error_description": "#{[:description]}"} if [:description] [[:status] || 400, {'Content-Type' => 'application/json'}, [%{{"error": "#{error}"#{description}}}]] end |