A Ruby client for the PassaporteWeb REST API

Gem Version Build Status Coverage Status Code Climate Status Inline docs

PassaporteWeb API docs:

passaporteweb-client-ruby RDoc documentation:

The RDoc is the best place to learn how to use this client. A few example uses are listed below. See the mapping of API endpoints to this client code below as well to find what you need.

This client only uses the API of PassaporteWeb. To use the Single Sign-On (SSO) feature of PassaporteWeb via OAuth in Ruby, see the omni_auth_passaporte_web gem (code and example of use).


Add this line to your application's Gemfile:

gem 'passaporteweb-client', :require => 'passaporte_web'

And then execute:

$ bundle

Or install it yourself as:

$ gem install passaporteweb-client


This gem supports Ruby 2.1 and Ruby 2.2.


Mapping of API endpoints to this client


require 'passaporte_web'

PassaporteWeb.configure do |c|
  c.url = '' # defaults to '' if omitted
  c.user_agent = 'My App v1.0' # optional, but you should pass a custom user-agent identifying your app
  c.application_token = 'some-app-token'
  c.application_secret = 'some-app-secret'
  c.user_token = 'some-user-token'


identity1 = PassaporteWeb::Identity.find("a5868d14-6529-477a-9c6b-a09dd42a7cd2") # ""
identity1.first_name # "John"

identity2 = PassaporteWeb::Identity.find_by_email("")
identity2.uuid # "a5868d14-6529-477a-9c6b-a09dd42a7cd2"

identity1 == profile2 # true

identity1.gender # nil
identity1.gender = 'M' # true
identity1.gender # 'M'

attributes = {
  "email" => "",
  "first_name" => "Luis Inácio",
  "last_name" => "da Silva",
  "password" => "rW5oHxYB",
  "password2" => "rW5oHxYB",
  "must_change_password" => true,
  "tos" => true,
  "inhibit_activation_message" => false,
  "cpf" => "353.423.680-73",
  "send_partner_news" => false,
  "send_myfreecomm_news" => false
identity = # true

attributes = {
  "email" => "",
  "first_name" => "Luis Inácio",
  "last_name" => "da Silva",
  "tos" => true
identity = # false
identity.errors # hash of errors


  1. Fork it

  2. Create your feature branch (`git checkout -b my-new-feature`)

  3. Commit your changes (`git commit -am 'Add some feature'`)

  4. Push to the branch (`git push origin my-new-feature`)

  5. Create new Pull Request