Giter VIP home page Giter VIP logo

signet's Introduction

Signet

Homepage
signet.rubyforge.org
Author
Bob Aman
Copyright
Copyright © 2010 Google, Inc.
License
Apache 2.0

Description

Signet is an OAuth 1.0 / OAuth 2.0 implementation.

Reference

  • {Signet::OAuth1}
  • {Signet::OAuth1::Client}
  • {Signet::OAuth1::Credential}
  • {Signet::OAuth2}
  • {Signet::OAuth2::Client}

Example Usage for Google

require 'signet/oauth_1/client'
client = Signet::OAuth1::Client.new(
  :temporary_credential_uri =>
    'https://www.google.com/accounts/OAuthGetRequestToken',
  :authorization_uri =>
    'https://www.google.com/accounts/OAuthAuthorizeToken',
  :token_credential_uri =>
    'https://www.google.com/accounts/OAuthGetAccessToken',
  :client_credential_key => 'anonymous',
  :client_credential_secret => 'anonymous'
)
client.fetch_temporary_credential!(:additional_parameters => {
  :scope => 'https://mail.google.com/mail/feed/atom'
})
# Send the user to client.authorization_uri, obtain verifier
client.fetch_token_credential!(:verifier => '12345')
response = client.fetch_protected_resource(
  :uri => 'https://mail.google.com/mail/feed/atom'
)
# The Rack response format is used here
status, headers, body = response

Install

sudo gem install signet

Be sure http://rubygems.org/ is in your gem sources.

signet's People

Contributors

sporkmonger avatar sethladd avatar

Watchers

John Baldwin avatar Edwin Robertson avatar Eric Alexander avatar Brian Grogan Jr avatar Nader Hendawi avatar Robert Kaufman avatar Michael Hoydis avatar  avatar Ben Povlich avatar Arron Norwell avatar Alex Ustymenko avatar J. Renée Beach avatar  avatar Gordon Carroll avatar daSong avatar James Cloos avatar DFB avatar Michael Leuchtenburg avatar  avatar Cloud Jerry avatar Richard Morello avatar  avatar Jonathan DePrizio avatar  avatar Elvis Montero avatar Jonathan W. Zaleski avatar Vishal Sunak avatar Evelyn avatar  avatar Abe Oppenheim avatar  avatar Casey J. Morris avatar  avatar Joshua avatar  avatar Ben Ouattara avatar Andy Gomez avatar Jay Byoun avatar John DeWolf avatar  avatar  avatar  avatar Keith Webber avatar Josh Bodah avatar Henry Lee avatar Dave Barboza avatar Andrew avatar Simon Watson avatar Gen Ohta avatar  avatar  avatar  avatar Desmond Yeung avatar Kameron Kirk avatar  avatar  avatar Chris Matysik avatar  avatar  avatar Zack Olson avatar  avatar  avatar  avatar Jonathan Russell avatar Moses Lagoon avatar  avatar  avatar  avatar  avatar Chris Gernon avatar Patrick McDermott avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.