Socket
Book a DemoInstallSign in
Socket

stagehand

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stagehand

0.0.4
bundlerRubygems
Version published
Maintainers
1
Created
Source

Stagehand

Stagehand is a client-side library for manipulating RESTful resources provided by Personas, a Rails + Backbone user managment service.

Usage

YourApp::Application.configure do           
  config.stagehand.client_id = 'YOUR_APP_CLIENT_ID'
  config.stagehand.client_secret = 'YOUR_APP_CLIENT_SECRET'
  config.stagehand.resource_host = 'YOUR_APP_RESOURCE_HOST'
  config.stagehand.client_host = 'YOUR_APP_HOST_WITH_PORT'
end                          

class SessionsController < ApplicationController
  # stagehand.authorize_url is an OAuth 2.0 url created by the 
  # configuration variables above. After the user is authenticated
  # and grants the client app access, the resource host performs
  # a callback setting the session[:access_token] and redirects
  # to the client app's root_url.
  def new  
    redirect_to Stagehand.authorize_url
  end  
  
  # Destroy the access_token (but leave the OAuth host cookie intact)  
  def destroy
    session[:access_token] = nil
    redirect_to root_url, :notice => "Logged out!"
  end
end

FAQs

Package last updated on 25 Oct 2011

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.