Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smashingboxes/stagehand
client library for Personas (user management) service
https://github.com/smashingboxes/stagehand
Last synced: 7 days ago
JSON representation
client library for Personas (user management) service
- Host: GitHub
- URL: https://github.com/smashingboxes/stagehand
- Owner: smashingboxes
- Created: 2011-10-24T13:29:44.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2012-03-06T20:58:12.000Z (over 12 years ago)
- Last Synced: 2024-10-13T03:50:25.271Z (about 1 month ago)
- Language: Ruby
- Homepage:
- Size: 199 KB
- Stars: 2
- Watchers: 39
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
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