Add the following line to your application's Gemfile.
And then run
First, get a token:
token = Aptible::Auth::Token.create(email: 'email@example.com', password: 'password')
From here, you can interact with the Authorization API however you wish:
auth = Aptible::Auth.new(token: token) auth.clients.first.name # => "Client 0" client = Aptible::Auth::Client.create(token: token, name: 'Dogeclient') client.href # => "http://localhost:4000/clients/60765b69-ffd8-4762-b9d2-96354ddb16f9"
||Root URL of the authorization server||
To point the client at a different authorization server (e.g., during development), add the following to your application's initializers (or set the
APTIBLE_AUTH_ROOT_URL environment variable):
Aptible::Auth.configure do |config| config.root_url = 'http://some.other.url' end
- Fork the project.
- Commit your changes, with specs.
- Ensure that your code passes specs (
rake spec) and meets Aptible's Ruby style guide (
- Create a new pull request on GitHub.
Copyright and License
MIT License, see LICENSE for details.
Copyright (c) 2014 Aptible and contributors.