omniauth-mit-oauth2 0.1.0 → 0.1.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: 3db752ef555c3cd5fca32ffdc4d3d010e7c07f6e
4
- data.tar.gz: 25dba93846917189125f28dca41537ea59bdb7fe
3
+ metadata.gz: 9675cfb77481115bbd2d5d8e6b385812a265a78d
4
+ data.tar.gz: 87956af5a93f5dd135796aa0220ed723229bd96f
5
5
  SHA512:
6
- metadata.gz: b33cfc0a214b90ae5c1e125e372ddfb8ffba3067380800a23a9080be9bc4f539ce8e2fa358816704d1df1ba4dcc846ac7d79971f9692ce5e0bd0625d108f7c6f
7
- data.tar.gz: 87253db41e8c22ceacd6dfa731cb8a40dc0627a7bf5f9b3f24eebba24757502c704293fdd7ff3c4516b70de34c22ad82391667e02c5d0e47387c1de3b360c7de
6
+ metadata.gz: a4ddacb9bb4bd9c7e82796ba01c220b31b51b28169b5c93a94e726d0c66dce3549f8a7fa59e9bd180c62a9009e288db4f9f902b3d0d18d44c0f3db4c9ad261b6
7
+ data.tar.gz: e1dab8b8de9e2de4eb4f60877feeb7de18206c070599aa424af3fd070c9f8b7f6b6a81709cb846097ed084eb05e68d00221b49cc2d02a5af02fd67ccf01e5934
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  This gem provides an OmniAuth strategy for authenticating users through [MIT OpenID Connect](https://oidc.mit.edu/).
4
4
 
5
+ [![Gem Version](https://badge.fury.io/rb/omniauth-mit-oauth2.svg)](https://badge.fury.io/rb/omniauth-mit-oauth2)
6
+
5
7
  ## Installation
6
8
 
7
9
  Add this line to your application's Gemfile:
@@ -27,9 +29,10 @@ Rails.application.config.middleware.use OmniAuth::Builder do
27
29
  provider :mit_oauth2, "MIT_OAUTH2_API_KEY", "MIT_OAUTH2_API_SECRET", {
28
30
  scope: "openid,name,email"
29
31
  }
32
+ end
30
33
  ```
31
34
 
32
- Replace `MIT_OAUTH2_API_KEY` and `MIT_OAUTH2_API_SECRET` with the values obtained from registering your service through MIT OIDC.
35
+ Replace `MIT_OAUTH2_API_KEY` and `MIT_OAUTH2_API_SECRET` with the values obtained from registering your service through MIT OIDC. You generally want to keep those out of version control so populate the values however you are handling secrets in your app.
33
36
 
34
37
  ## Devise
35
38
 
@@ -108,7 +111,7 @@ Devise.setup do |config|
108
111
  end
109
112
  ```
110
113
 
111
- Replace `MIT_OAUTH2_API_KEY` and `MIT_OAUTH2_API_SECRET` with the values obtained by registering your site.
114
+ Replace `MIT_OAUTH2_API_KEY` and `MIT_OAUTH2_API_SECRET` with the values obtained by registering your site through MIT OIDC. You generally want to keep those out of version control so populate the values however you are handling secrets in your app.
112
115
 
113
116
  Now we need to set up the routes:
114
117
 
@@ -175,4 +178,3 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/MITLib
175
178
  ## License
176
179
 
177
180
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
178
-
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module MITOAuth2
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -24,6 +24,10 @@ module OmniAuth
24
24
  { raw_info: raw_info }
25
25
  end
26
26
 
27
+ def callback_url
28
+ full_host + script_name + callback_path
29
+ end
30
+
27
31
  def raw_info
28
32
  @raw_info ||= access_token.get('/userinfo').parsed
29
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-mit-oauth2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Graves
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-11 00:00:00.000000000 Z
11
+ date: 2015-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2
@@ -105,8 +105,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  requirements: []
107
107
  rubyforge_project:
108
- rubygems_version: 2.4.5
108
+ rubygems_version: 2.4.5.1
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: OmniAuth strategy for MIT OIDC
112
112
  test_files: []
113
+ has_rdoc: