Skip to content

Commit

Permalink
Updated readme with sample response
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkeramidas committed Dec 14, 2016
1 parent 607054c commit c1d26a8
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@
InstalledFiles
lib/bundler/man
rdoc
omniauth-authentiq-0.2.0.gem
omniauth-authentiq-0.2.1.gem
omniauth-authentiq-*
.ruby-version
55 changes: 54 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Application credentials can be obtained [at Authentiq](https://www.authentiq.com
Add this line to your application's Gemfile

```ruby
gem 'omniauth-authentiq', '~> 0.2.0'
gem 'omniauth-authentiq', '~> 0.2.2'
```

Then bundle:
Expand Down Expand Up @@ -55,6 +55,59 @@ Append `~s` to phone or email scope to explicitly require a verified (signed) sc

The `~s` and `~r` can be combined to `~rs` to indicate that the scope is both required and should be / have been verified.

# Response
An example response, in the form of a ruby hash, after requesting all possible scopes would be

```ruby
{
"provider" => "authentiq",
"uid" => "E1YcKg143eO6Z-e-3vK1GBJEGpKlIpX1-BbeA3GY6II",
"info" => {
"name" => "First Middle Last",
"first_name" => "First",
"last_name" => "Last",
"email" => "[email protected]",
"phone" => "+15417543010",
"location" => {
"country" => "Country",
"formatted" => "Street\nCity\nPostal Code\nState\nCountry",
"locality" => "City",
"postal_code" => "Postal Code",
"state" => "State",
"street_address" => "Street"
},
"geolocation" => {
"accuracy" => 20.509,
"address" => {
"country" => "Geo country",
"formatted" => "Geo street\nGeo city\nGeo postal_code\nGeo country",
"locality" => "Geo city",
"postal_code" => "Geo postal_code",
"street_address" => "Geo street"
},
"altitude" => 0.0,
"latitude" => 55.340157,
"longitude" => -30.555491,
"speed" => 0.0
}
},
"credentials" => {
"token" => "gVh3XACpE3pchcV7f9jcAJOurRE7pN",
"refresh_token" => "5xqib7u9u79HbRoXXqom7V9REtxhzt",
"expires_at" => 1481706571,
"expires" => true
},
"extra" => {
"middle_name" => "Middle",
"email_verified" => true,
"phone_type" => "mobile",
"phone_number_verified" => true,
"locale" => "language_territory", # eg en_US
"zoneinfo" => "Continent/City", # eg Europe/Amsterdam
}
}
```


## Tests

Expand Down

0 comments on commit c1d26a8

Please sign in to comment.