Ruby client library for FusionAuth
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib/fusionauth merge Social to master Nov 13, 2018
test Fix import and tests Sep 10, 2018
.gitignore Initial commit Aug 24, 2018
.ruby-version Initial commit Aug 24, 2018
Gemfile IML Oct 5, 2018
LICENSE.txt Initial commit Aug 24, 2018
README.md fix readme Sep 10, 2018
Rakefile Initial commit Aug 24, 2018
build.savant Updated version for fusionauth-ruby-client to 1.3.1 Dec 6, 2018
fusionauth-ruby-client.iml IML Nov 17, 2018
fusionauth_client.gemspec Updated version for fusionauth-ruby-client to 1.3.1 Dec 6, 2018

README.md

FusionAuth::FusionAuthClient

This gem is the Ruby client library that helps connect Ruby applications to the FusionAuth (https://fusionauth.io) Identity and User Management platform.

Installation

Add this line to your application's Gemfile:

gem 'fusionauth_client'

And then execute:

$ bundle

Or install it yourself as:

$ gem install fusionauth_client

Usage

Once the gem is installed, you can call FusionAuth APIs like this:

# Create a user + registration
id = SecureRandom.uuid
client.register!(id, {
    :user => {
        :firstName => 'Ruby',
        :lastName => 'Client',
        :email => 'ruby.client.test@fusionauth.io',
        :password => 'password'
    },
    :registration => {
        :applicationId => application_id,
        :data => {
            :foo => 'bar'
        },
        :preferredLanguages => %w(en fr),
        :roles => %w(user)
    }
})

# Authenticate the user
response = client.login!({
    :loginId => 'ruby.client.test@fusionauth.io',
    :password => 'password',
    :applicationId => application_id
})
user = response.user

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/FusionAuth/fusionauth-ruby-client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the Apache v2.0 License.