rack-openid 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ffa1c0c3b3e9d62ad033405c449ca5bbe6289734
4
- data.tar.gz: fa39ead3431fa078dba08042948b0b45bd681a46
3
+ metadata.gz: baa6d79858863be57b086b541ab63c6c972c3af8
4
+ data.tar.gz: 08e650720bbe74a979a1124a6c92067d9a7aece2
5
5
  SHA512:
6
- metadata.gz: ffdb2ac397a554858029744ac48855745fccffdb4b49c410255a8f857e3a92fe97ebb2e43a95c73d752189cf2c3d41e63ec98884aba7ae9fecdec60104ba077a
7
- data.tar.gz: 72a9a6834c6584cc39b592aab031023324ca3cfe7122f5ed5ba09605847b7805c57057a7e2bcebb9a11a43223c81684f91eaba063ed48e2b5fd9f3ebd038b48f
6
+ metadata.gz: 17e508ee39e107a0a789b33dabfe7853f7ac4ade8404b3c8c459ac8c6a6477c05395bc093870184e858299d3ce3a999a171673f9f891956a289e9089482f9e6e
7
+ data.tar.gz: c9aead4288a53e7f65d2bc1e9a40d2b2e30f8e61879b69c9c3900e83ff78216ad66f31a20815ceac39ac400e6b651263e21858d679731afbe4f693c86f244973
checksums.yaml.gz.sig ADDED
Binary file
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  class OpenID
3
- VERSION = "1.4.0"
3
+ VERSION = "1.4.1"
4
4
  end
5
5
  end
data/lib/rack/openid.rb CHANGED
@@ -6,6 +6,7 @@ require 'openid/consumer'
6
6
  require 'openid/extensions/sreg'
7
7
  require 'openid/extensions/ax'
8
8
  require 'openid/extensions/oauth'
9
+ require 'openid/extensions/pape'
9
10
 
10
11
  module Rack #:nodoc:
11
12
  # A Rack middleware that provides a more HTTPish API around the
@@ -123,6 +124,7 @@ module Rack #:nodoc:
123
124
  add_simple_registration_fields(oidreq, params)
124
125
  add_attribute_exchange_fields(oidreq, params)
125
126
  add_oauth_fields(oidreq, params)
127
+ add_pape_fields(oidreq, params)
126
128
 
127
129
  url = open_id_redirect_url(req, oidreq, params)
128
130
  return redirect_to(url)
@@ -277,6 +279,16 @@ module Rack #:nodoc:
277
279
  oidreq.add_extension(oauthreq)
278
280
  end
279
281
  end
282
+
283
+ def add_pape_fields(oidreq, fields)
284
+ preferred_auth_policies = fields['pape[preferred_auth_policies]']
285
+ max_auth_age = fields['pape[max_auth_age]']
286
+ if preferred_auth_policies || max_auth_age
287
+ preferred_auth_policies = preferred_auth_policies.split if preferred_auth_policies.is_a?(String)
288
+ pape_request = ::OpenID::PAPE::Request.new(preferred_auth_policies || [], max_auth_age)
289
+ oidreq.add_extension(pape_request)
290
+ end
291
+ end
280
292
 
281
293
  def default_store
282
294
  require 'openid/store/memory'
data.tar.gz.sig ADDED
Binary file
metadata CHANGED
@@ -1,15 +1,36 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-openid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  - Joshua Peek
9
9
  autorequire:
10
10
  bindir: bin
11
- cert_chain: []
12
- date: 2013-10-11 00:00:00.000000000 Z
11
+ cert_chain:
12
+ - |
13
+ -----BEGIN CERTIFICATE-----
14
+ MIIDMjCCAhqgAwIBAgIBADANBgkqhkiG9w0BAQUFADA/MRAwDgYDVQQDDAdtaWNo
15
+ YWVsMRcwFQYKCZImiZPyLGQBGRYHZ3Jvc3NlcjESMBAGCgmSJomT8ixkARkWAml0
16
+ MB4XDTEzMDIwMzE4MTMxMVoXDTE0MDIwMzE4MTMxMVowPzEQMA4GA1UEAwwHbWlj
17
+ aGFlbDEXMBUGCgmSJomT8ixkARkWB2dyb3NzZXIxEjAQBgoJkiaJk/IsZAEZFgJp
18
+ dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMorXo/hgbUq97+kII9H
19
+ MsQcLdC/7wQ1ZP2OshVHPkeP0qH8MBHGg6eYisOX2ubNagF9YTCZWnhrdKrwpLOO
20
+ cPLaZbjUjljJ3cQR3B8Yn1veV5IhG86QseTBjymzJWsLpqJ1UZGpfB9tXcsFtuxO
21
+ 6vHvcIHdzvc/OUkICttLbH+1qb6rsHUceqh+JrH4GrsJ5H4hAfIdyS2XMK7YRKbh
22
+ h+IBu6dFWJJByzFsYmV1PDXln3UBmgAt65cmCu4qPfThioCGDzbSJrGDGLmw/pFX
23
+ FPpVCm1zgYSb1v6Qnf3cgXa2f2wYGm17+zAVyIDpwryFru9yF/jJxE38z/DRsd9R
24
+ /88CAwEAAaM5MDcwCQYDVR0TBAIwADAdBgNVHQ4EFgQUsiNnXHtKeMYYcr4yJVmQ
25
+ WONL+IwwCwYDVR0PBAQDAgSwMA0GCSqGSIb3DQEBBQUAA4IBAQAlyN7kKo/NQCQ0
26
+ AOzZLZ3WAePvStkCFIJ53tsv5Kyo4pMAllv+BgPzzBt7qi605mFSL6zBd9uLou+W
27
+ Co3s48p1dy7CjjAfVQdmVNHF3MwXtfC2OEyvSQPi4xKR8iba8wa3xp9LVo1PuLpw
28
+ /6DsrChWw74HfsJN6qJOK684hJeT8lBYAUfiC3wD0owoPSg+XtyAAddisR+KV5Y1
29
+ NmVHuLtQcNTZy+gRht3ahJRMuC6QyLmkTsf+6MaenwAMkAgHdswGsJztOnNnBa3F
30
+ y0kCSWmK6D+x/SbfS6r7Ke07MRqziJdB9GuE1+0cIRuFh8EQ+LN6HXCKM5pon/GU
31
+ ycwMXfl0
32
+ -----END CERTIFICATE-----
33
+ date: 2013-11-11 00:00:00.000000000 Z
13
34
  dependencies:
14
35
  - !ruby/object:Gem::Dependency
15
36
  name: rack
metadata.gz.sig ADDED
Binary file