Class: OpenID::AX::StoreResponse
- Defined in:
- lib/openid/extensions/ax.rb
Overview
An indication that the store request was processed along with this OpenID transaction.
Constant Summary collapse
- SUCCESS_MODE =
'store_response_success'
- FAILURE_MODE =
'store_response_failure'
Constants inherited from AXMessage
Instance Attribute Summary collapse
-
#error_message ⇒ Object
readonly
Returns the value of attribute error_message.
Attributes inherited from AXMessage
Instance Method Summary collapse
- #get_extension_args ⇒ Object
-
#initialize(succeeded = true, error_message = nil) ⇒ StoreResponse
constructor
A new instance of StoreResponse.
- #succeeded? ⇒ Boolean
Methods inherited from Extension
Constructor Details
#initialize(succeeded = true, error_message = nil) ⇒ StoreResponse
Returns a new instance of StoreResponse.
490 491 492 493 494 495 496 497 498 499 500 501 |
# File 'lib/openid/extensions/ax.rb', line 490 def initialize(succeeded = true, = nil) super() if succeeded and raise Error, "Error message included in a success response" end if succeeded @mode = SUCCESS_MODE else @mode = FAILURE_MODE end @error_message = end |
Instance Attribute Details
#error_message ⇒ Object (readonly)
Returns the value of attribute error_message.
488 489 490 |
# File 'lib/openid/extensions/ax.rb', line 488 def @error_message end |
Instance Method Details
#get_extension_args ⇒ Object
507 508 509 510 511 512 513 |
# File 'lib/openid/extensions/ax.rb', line 507 def get_extension_args ax_args = new_args if !succeeded? and ax_args['error'] = @error_message end return ax_args end |
#succeeded? ⇒ Boolean
503 504 505 |
# File 'lib/openid/extensions/ax.rb', line 503 def succeeded? @mode == SUCCESS_MODE end |