Class: OAuth2::Provider::Error
- Inherits:
-
Object
- Object
- OAuth2::Provider::Error
- Defined in:
- lib/oauth2/provider/error.rb
Instance Method Summary collapse
-
#initialize(message = nil) ⇒ Error
constructor
A new instance of Error.
- #redirect? ⇒ Boolean
- #response_body ⇒ Object
- #response_headers ⇒ Object
- #response_status ⇒ Object
Constructor Details
#initialize(message = nil) ⇒ Error
Returns a new instance of Error.
5 6 7 |
# File 'lib/oauth2/provider/error.rb', line 5 def initialize( = nil) @message = end |
Instance Method Details
#redirect? ⇒ Boolean
9 10 11 |
# File 'lib/oauth2/provider/error.rb', line 9 def redirect? false end |
#response_body ⇒ Object
13 14 15 16 |
# File 'lib/oauth2/provider/error.rb', line 13 def response_body = 'Bad request' + (@message ? ": #{@message}" : '') JSON.unparse(ERROR => INVALID_REQUEST, ERROR_DESCRIPTION => ) end |
#response_headers ⇒ Object
18 19 20 |
# File 'lib/oauth2/provider/error.rb', line 18 def response_headers Exchange::RESPONSE_HEADERS end |
#response_status ⇒ Object
22 23 24 |
# File 'lib/oauth2/provider/error.rb', line 22 def response_status 400 end |