Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

oauth-activeresource

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oauth-activeresource

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= OauthActiveResource

Rails gem that allows you to easily interact with an Oauth secured rest API with the ActiveResource model. You have to provide an http-like object that signs your requests with your already retrieved access_token, like the one that the oauth gem provides (http://oauth.rubyforge.org/rdoc/classes/OAuth/AccessToken.html)

= Getting Started

Assuming that you are using oauth gem:

  1. Add into your Gemfile:

    gem 'oauth-activeresource'

  2. Make your models inherit from OauthActiveResource instead ActiveResource

    class MyModel < OauthActiveResource::Base end

  3. Set a before_filter in your controllers to override your connection object with your access_token object

    def set_oauth MyModel.oauth_connection = session[:request_token].get_access_token( :oauth_verifier => params[:oauth_verifier] ) end

    Where session[:request_token] is your OAuth::Consumer and params[:oauth_verifier] the parameters that the authorizer is sending to your callback method.

FAQs

Package last updated on 23 Feb 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc