Class: MekariSso::ValidatePassword
- Inherits:
-
HttpRequest
- Object
- HttpRequest
- MekariSso::ValidatePassword
- Defined in:
- lib/requests/validate_password.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #headers_request ⇒ Object
-
#initialize(config, params) ⇒ ValidatePassword
constructor
A new instance of ValidatePassword.
- #send ⇒ Object
Methods inherited from HttpRequest
#after_error, #after_success, #handle_error, #handle_response, #headers, #original_response
Constructor Details
#initialize(config, params) ⇒ ValidatePassword
Returns a new instance of ValidatePassword.
11 12 13 14 |
# File 'lib/requests/validate_password.rb', line 11 def initialize(config, params) @config = config @params = params end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
9 10 11 |
# File 'lib/requests/validate_password.rb', line 9 def config @config end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
9 10 11 |
# File 'lib/requests/validate_password.rb', line 9 def params @params end |
Instance Method Details
#headers_request ⇒ Object
23 24 25 26 27 28 |
# File 'lib/requests/validate_password.rb', line 23 def headers_request headers.merge({ authorization: "Bearer #{@params.access_token}", accept_language: @config.accept_language }) end |
#send ⇒ Object
30 31 32 |
# File 'lib/requests/validate_password.rb', line 30 def send RestClient.post "#{@config.base_url}/v1.1/users/authenticate", params, headers_request end |