Method: Auth::TwoFactorOtp#send_otp_response
- Defined in:
- lib/auth/two_factor_otp.rb
#send_otp_response ⇒ Object
138 139 140 141 142 143 144 145 |
# File 'lib/auth/two_factor_otp.rb', line 138 def send_otp_response if Auth.configuration.stub_otp_api_calls == true OpenStruct.new({code: 200, body: JSON.generate({:Status => "Success", :Details => Faker::Name.name})}) else Typhoeus.get("https://2factor.in/API/V1/#{Auth.configuration.third_party_api_keys[:two_factor_sms_api_key]}/SMS/+91#{resource.additional_login_param}/AUTOGEN", timeout: typhoeus_timeout) end end |