clavem

A local callback server for oAuth web-flow.

View on GitHub

Introduction

Gem Version Dependency Status Build Status Code Climate Coverage Status

A local callback server for oAuth web-flow.

https://sw.cowtech.it/clavem

Usage

clavem allows you to handle a full oAuth authentication flow directly from the console.

Simply instantiate the authorizer and run the authorize method with the URL:

require "clavem"

# Initialize your oAuth access.

authorizer = Clavem::Authorizer.new

# Get the token
# You can also handle callback parameter by yourself.
# url += "?oauth_callback=" + authorizer.callback_url
# authorizer.authorize(url, false)
authorizer.authorize(url)

if authorizer.succeeded? then
  access_token = authorizer.token

  # Go on!
else
  # Authorization denied or failed
end

Alternatively, you can also specify a timeout and a block to the constructor to customizer the response handling.

See the documentation for more information.

Use on jRuby

To use on jRuby, you need to install a gem with C extensions which must be compiled.

See jRuby documentation to see how to enabled extensions compilation.

API Documentation

The API documentation can be found here.

Contributing to clavem

Copyright

Copyright (C) 2013 and above Shogun (shogun@cowtech.it).

Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.

Your browser is obsolete. For the best browsing experience, update it for free by visiting BrowseHappy.
There is a shiny new version. Update now!
Made by a proud Italian!