Class: Fnsapi::AuthService
- Inherits:
-
BaseService
- Object
- BaseService
- Fnsapi::AuthService
- Defined in:
- lib/fnsapi/auth_service.rb
Instance Method Summary collapse
Methods inherited from BaseService
Instance Method Details
#reset_credentials ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/fnsapi/auth_service.rb', line 5 def reset_credentials result = client.call(:get_message, message: ) = result.body.dig(:get_message_response, :message) raise RequestError, [:fault][:message] if [:fault] token = .dig(:auth_response, :result, :token) expired_at = Time.parse(.dig(:auth_response, :result, :expire_time)) return if token.blank? put_token!(token, expired_at) token end |