]> git.openstreetmap.org Git - rails.git/blob - vendor/plugins/oauth-plugin/generators/oauth_provider/USAGE
Pull in some upstream updates to http_accept_language
[rails.git] / vendor / plugins / oauth-plugin / generators / oauth_provider / USAGE
1 ./script/generate oauth_provider 
2
3 This creates an OAuth Provider controller as well as the requisite models.
4
5 It requires an authentication framework such as acts_as_authenticated, restful_authentication or restful_open_id_authentication.
6
7 If you generated the migration file (true by default), make sure you run
8 rake db:migrate
9
10 You need to add the following routes to your config/routes.rb file:
11
12 map.resources :oauth_clients
13 map.oauth '/oauth',:controller=>'oauth',:action=>'index'
14 map.authorize '/oauth/authorize',:controller=>'oauth',:action=>'authorize'
15 map.request_token '/oauth/request_token',:controller=>'oauth',:action=>'request_token'
16 map.access_token '/oauth/access_token',:controller=>'oauth',:action=>'access_token'
17 map.test_request '/oauth/test_request',:controller=>'oauth',:action=>'test_request'
18
19 include the following in your user.rb
20
21 has_many :client_applications
22 has_many :tokens, :class_name=>"OauthToken",:order=>"authorized_at desc",:include=>[:client_application]
23
24