cosmos_authentication 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,7 +14,7 @@ module CosmosAuthentication
14
14
  begin
15
15
  token = access_token(scope)
16
16
  @current = service.resource_owner(token)
17
- rescue Cosmos::UnknownLinkError => e
17
+ rescue Cosmos::UnknownLinkError, Cosmos::FailedCheckError
18
18
  session[:access_token] = nil
19
19
  authenticate
20
20
  end
@@ -87,6 +87,7 @@ module CosmosAuthentication
87
87
  use Cosmos::Middleware::Discover
88
88
  use Cosmos::Middleware::Traverse, 'resource-owners'
89
89
  use Cosmos::Middleware::Traverse, 'current'
90
+ use Cosmos::Middleware::Check, :has_one_item?
90
91
  use Cosmos::Middleware::Save, :resource_owner
91
92
  end
92
93
 
@@ -1,3 +1,3 @@
1
1
  module CosmosAuthentication
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cosmos_authentication
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-04-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cosmos
16
- requirement: &70219771179280 !ruby/object:Gem::Requirement
16
+ requirement: &70159235054920 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70219771179280
24
+ version_requirements: *70159235054920
25
25
  description: A client for the cosmos authentication service.
26
26
  email:
27
27
  - sebastian@uprise.co.nz