exvo-auth 0.7.7 → 0.7.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README +6 -7
  2. data/VERSION +1 -1
  3. data/exvo-auth.gemspec +1 -1
  4. metadata +2 -2
data/README CHANGED
@@ -98,17 +98,16 @@ Inter-Application Communication
98
98
  consumer = ExvoAuth::Autonomous::Consumer.new(
99
99
  :provider_id => "this is client_id of the app you want to connect to"
100
100
  )
101
- consumer.access_token => "this is the access token to use along with your client_id to communicate with providing app"
101
+ consumer.get(*args) - interface is exactly the same like in HTTParty. All http methods are available (post, put, delete, head, options).
102
102
 
103
103
 
104
104
  # Provider side
105
105
 
106
- provider = ExvoAuth::Autonomous::Provider.new(
107
- :consumer_id => "the client_id of the consuming app",
108
- :access_token => "the access_token of the consuming app"
109
- )
110
- provider.scopes => ["users", "payments"] # example access scopes defined in auth server.
111
-
106
+ See #authenticate_app_in_scope!(scope) method in ExvoAuth::Controllers::Rails (or Merb). This method lets you create a before filter.
112
107
  Scopes are used by providing app to check if a given consuming app should have access to a given resource inside a scope.
113
108
  If scopes are empty, then provider app should not present any resources to consumer.
114
109
 
110
+ # Example of the before filter for provider controller:
111
+
112
+ before_filter {|c| c.authenticate_app_in_scope!("payments") }
113
+
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.7
1
+ 0.7.8
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{exvo-auth}
8
- s.version = "0.7.7"
8
+ s.version = "0.7.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jacek Becela"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 7
8
- - 7
9
- version: 0.7.7
8
+ - 8
9
+ version: 0.7.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jacek Becela