Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Need to pass as a string in PHP

  • Loading branch information...
commit a03d81f7fa1a5354f9b287c6f6f89161bf7f73d8 1 parent ef6ef21
Mike Carson ca98am79 authored
4 README.md
Source Rendered
@@ -100,7 +100,7 @@ Once again you can use `ok()` to verify whether the token was valid or not.
100 100
101 101 If you wish to verify tokens even if the user has not yet complete registration, pass force=true when verifying the token.
102 102
103   - $verification = $authy_api->verifyToken('authy-id', 'token-entered-by-the-user', array("force" => true));
  103 + $verification = $authy_api->verifyToken('authy-id', 'token-entered-by-the-user', array("force" => "true"));
104 104
105 105 ## Requesting SMS Tokens
106 106 To be able to use this method you need to have activated the SMS plugin for your Authy App.
@@ -113,7 +113,7 @@ As always, you can use `ok()` to verify if the token was sent.
113 113 This call will be ignored if the user is using the Authy Mobile App. If you still want to send
114 114 the SMS pass force=>true as an option
115 115
116   - $sms = $authy_api->requestSms('authy-id', array("force" => true));
  116 + $sms = $authy_api->requestSms('authy-id', array("force" => "true"));
117 117
118 118
119 119 ### More…
4 lib/Authy/Api.php
@@ -71,7 +71,7 @@ public function registerUser($email, $cellphone, $country_code = 1)
71 71 *
72 72 * @param string $authy_id User's id stored in your database
73 73 * @param string $token The token entered by the user
74   - * @param string $opts Array of options, for example: array("force" => true)
  74 + * @param string $opts Array of options, for example: array("force" => "true")
75 75 *
76 76 * @return Authy_Response the server response
77 77 */
@@ -89,7 +89,7 @@ public function verifyToken($authy_id, $token, $opts = array())
89 89 * Request a valid token via SMS.
90 90 *
91 91 * @param string $authy_id User's id stored in your database
92   - * @param string $opts Array of options, for example: array("force" => true)
  92 + * @param string $opts Array of options, for example: array("force" => "true")
93 93 *
94 94 * @return Authy_Response the server response
95 95 */
4 tests/Authy/ApiTest.php
@@ -48,14 +48,14 @@ public function testVerifyTokenWithInvalidToken() {
48 48 }
49 49
50 50 public function testRequestSmsWithInvalidUser() {
51   - $sms = $this->client->requestSms(0, array("force" => true));
  51 + $sms = $this->client->requestSms(0, array("force" => "true"));
52 52
53 53 $this->assertEquals(false, $sms->ok());
54 54 }
55 55
56 56 public function testRequestSmsWithValidUser() {
57 57 $user = $this->client->registerUser('user@example.com', '305-456-2345', 1);
58   - $sms = $this->client->requestSms($user->id(), array("force" => true));
  58 + $sms = $this->client->requestSms($user->id(), array("force" => "true"));
59 59
60 60 $this->assertEquals(true, $sms->ok());
61 61 //$this->assertEquals("is not activated for this account", $sms->errors()->enable_sms);

0 comments on commit a03d81f

Please sign in to comment.
Something went wrong with that request. Please try again.