openid_connect 0.0.30 → 0.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- openid_connect (0.0.29)
4
+ openid_connect (0.0.30)
5
5
  activemodel (>= 3)
6
6
  attr_required (>= 0.0.3)
7
7
  json (>= 1.4.3)
@@ -32,7 +32,6 @@ GEM
32
32
  jruby-openssl (0.7.4)
33
33
  bouncy-castle-java
34
34
  json (1.6.1)
35
- json (1.6.1-java)
36
35
  json-jwt (0.0.3)
37
36
  json (>= 1.4.3)
38
37
  url_safe_base64
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.30
1
+ 0.0.31
@@ -1,11 +1,11 @@
1
1
  module OpenIDConnect
2
2
  class Client < Rack::OAuth2::Client
3
- attr_optional :check_session_endpoint, :user_info_endpoint
3
+ attr_optional :check_id_endpoint, :user_info_endpoint
4
4
 
5
5
  def initialize(attributes = {})
6
6
  super
7
- @user_info_endpoint ||= '/user_info'
8
- @check_session_endpoint ||= '/id_token'
7
+ @user_info_endpoint ||= '/user_info'
8
+ @check_id_endpoint ||= '/id_token'
9
9
  end
10
10
 
11
11
  def authorization_uri(params = {})
@@ -14,8 +14,8 @@ module OpenIDConnect
14
14
  super
15
15
  end
16
16
 
17
- def check_session_uri
18
- absolute_uri_for check_session_endpoint
17
+ def check_id_uri
18
+ absolute_uri_for check_id_endpoint
19
19
  end
20
20
 
21
21
  def user_info_uri
@@ -34,7 +34,7 @@ module OpenIDConnect
34
34
  attributes = case key_or_client
35
35
  when Client
36
36
  resource_request do
37
- http_client.post key_or_client.check_session_uri, :id_token => jwt_string
37
+ http_client.post key_or_client.check_id_uri, :id_token => jwt_string
38
38
  end
39
39
  else
40
40
  JSON::JWT.decode(jwt_string, key_or_client).with_indifferent_access
@@ -19,12 +19,12 @@ describe OpenIDConnect::Client do
19
19
  end
20
20
  its(:authorization_uri) { should include 'https://server.example.com/oauth2/authorize' }
21
21
  its(:authorization_uri) { should include 'scope=openid' }
22
- its(:check_session_uri) { should == 'https://server.example.com/id_token' }
22
+ its(:check_id_uri) { should == 'https://server.example.com/id_token' }
23
23
  its(:user_info_uri) { should == 'https://server.example.com/user_info' }
24
24
  end
25
25
 
26
26
  context 'otherwise' do
27
- [:authorization_uri, :check_session_uri, :user_info_uri].each do |endpoint|
27
+ [:authorization_uri, :check_id_uri, :user_info_uri].each do |endpoint|
28
28
  describe endpoint do
29
29
  it do
30
30
  expect { client.send endpoint }.should raise_error 'No Host Info'
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: openid_connect
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.30
5
+ version: 0.0.31
6
6
  platform: ruby
7
7
  authors:
8
8
  - nov matake