omniauth-clever 1.1.0 → 1.2.0
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.
- checksums.yaml +4 -4
- data/README.md +10 -7
- data/lib/omniauth/clever/version.rb +1 -1
- data/lib/omniauth/strategies/clever.rb +4 -15
- data/omniauth-clever.gemspec +4 -4
- metadata +12 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 458dce33b0c16ae69f770ac1f759d070ecb339a5
|
4
|
+
data.tar.gz: 2484de2c25fa6c9cf24058abef451a32cb504565
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71073ce5b8faa831d24f559e51aefd4412f7a7243e245b534148c1415f271f9dac21ebf9a33c253afc2f6ed2249bb8119ffab9acf91b29512d66bcb3bd65e3fe
|
7
|
+
data.tar.gz: 26a7e7e5db382cfe5149b11d3f4b7488d9ea3fea818170987251629f8be37a7569ba8223737a986889b652c0e923685fe785906f3b91d60e17323ea80841a650
|
data/README.md
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# OmniAuth Clever
|
2
2
|
|
3
|
-
Unofficial OmniAuth strategy for [Clever SSO OAuth2](https://clever.com/
|
3
|
+
Unofficial OmniAuth strategy for [Clever SSO OAuth2](https://dev.clever.com/sso) integration.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
7
|
Add the gem to your application's Gemfile:
|
8
8
|
|
9
|
-
gem 'omniauth-clever', '~> 1.
|
9
|
+
gem 'omniauth-clever', '~> 1.2.0'
|
10
10
|
|
11
11
|
And then execute:
|
12
12
|
|
@@ -30,8 +30,8 @@ end
|
|
30
30
|
|
31
31
|
## Configuring
|
32
32
|
|
33
|
-
To be able to set the optional `
|
34
|
-
per-request basis
|
33
|
+
To be able to set the optional `district_id` parameter on a
|
34
|
+
per-request basis, passing this params to your `/auth/clever` url, use
|
35
35
|
this in the initializer instead:
|
36
36
|
|
37
37
|
```ruby
|
@@ -39,12 +39,15 @@ Rails.application.config.middleware.use OmniAuth::Builder do
|
|
39
39
|
provider :clever, ENV['CLEVER_CLIENT_ID'], ENV['CLEVER_CLIENT_SECRET'],
|
40
40
|
:setup => lambda { |env|
|
41
41
|
params = Rack::Utils.parse_query(env['QUERY_STRING'])
|
42
|
-
env['omniauth.strategy'].options[:client_options][:
|
43
|
-
env['omniauth.strategy'].options[:client_options][:dev] = params['dev']
|
42
|
+
env['omniauth.strategy'].options[:client_options][:district_id] = params['district_id']
|
44
43
|
}
|
45
44
|
end
|
46
45
|
```
|
47
46
|
|
47
|
+
## Testing
|
48
|
+
|
49
|
+
This strategy can be and has been tested with the [omniauth-test-harness](https://github.com/PracticallyGreen/omniauth-test-harness).
|
50
|
+
|
48
51
|
## Contributing
|
49
52
|
|
50
53
|
1. Fork it
|
@@ -62,7 +65,7 @@ MIT. See LICENSE.txt.
|
|
62
65
|
Thank you to the [Clever](https://github.com/Clever/) team for their awesome
|
63
66
|
product and always being helpful with any issues. Thank you to [Think Through
|
64
67
|
Math](https://github.com/thinkthroughmath) for dedicating time for the tech
|
65
|
-
team to make open source contributions such as this.
|
68
|
+
team to make open source contributions such as this. Thank you to [StudyPad](https://github.com/StudyPad) for helping bringing the strategy up to date.
|
66
69
|
|
67
70
|
And, of course. thank you to [Omniauth](https://github.com/intridea/omniauth)
|
68
71
|
for making it so easy create this gem!
|
@@ -8,24 +8,13 @@ module OmniAuth
|
|
8
8
|
|
9
9
|
option :client_options, {
|
10
10
|
:site => 'https://api.clever.com',
|
11
|
-
:authorize_url => 'https://
|
12
|
-
:token_url => 'https://
|
11
|
+
:authorize_url => 'https://clever.com/oauth/authorize',
|
12
|
+
:token_url => 'https://clever.com/oauth/tokens'
|
13
13
|
}
|
14
14
|
|
15
|
-
def authorize_params
|
16
|
-
super.tap do |params|
|
17
|
-
params[:scope] = 'read_only'
|
18
|
-
params[:clever_landing] = options.client_options.clever_landing || 'admin'
|
19
|
-
if options.client_options.dev
|
20
|
-
params[:dev] = options.client_options.dev
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
15
|
def token_params
|
26
|
-
username_password = options.client_secret + ":"
|
27
16
|
super.tap do |params|
|
28
|
-
params[:headers] = {'Authorization' => "Basic #{Base64.
|
17
|
+
params[:headers] = {'Authorization' => "Basic #{Base64.strict_encode64("#{options.client_id}:#{options.client_secret}")}"}
|
29
18
|
end
|
30
19
|
end
|
31
20
|
|
@@ -48,4 +37,4 @@ module OmniAuth
|
|
48
37
|
end
|
49
38
|
end
|
50
39
|
end
|
51
|
-
end
|
40
|
+
end
|
data/omniauth-clever.gemspec
CHANGED
@@ -6,11 +6,11 @@ require 'omniauth/clever/version'
|
|
6
6
|
Gem::Specification.new do |gem|
|
7
7
|
gem.name = "omniauth-clever"
|
8
8
|
gem.version = Omniauth::Clever::VERSION
|
9
|
-
gem.authors = ["Carol Nichols"]
|
10
|
-
gem.email = ["cnichols@thinkthroughmath.com"]
|
11
|
-
gem.description = %q{
|
9
|
+
gem.authors = ["Carol Nichols", "Swati Aggarwal"]
|
10
|
+
gem.email = ["cnichols@thinkthroughmath.com", "swati.aggarwal2412@gmail.com"]
|
11
|
+
gem.description = %q{OmniAuth strategy for clever.com SSO OAuth2 integration}
|
12
12
|
gem.summary = %q{The unofficial strategy for authenticating people using clever.com to your application using Clever's OAuth2 provider}
|
13
|
-
gem.homepage = "https://github.com/
|
13
|
+
gem.homepage = "https://github.com/clever/omniauth-clever"
|
14
14
|
gem.license = 'MIT'
|
15
15
|
|
16
16
|
gem.signing_key = ENV['GEM_PRIVATE_KEY']
|
metadata
CHANGED
@@ -1,38 +1,40 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-clever
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carol Nichols
|
8
|
+
- Swati Aggarwal
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain:
|
11
12
|
- gem-public_cert.pem
|
12
|
-
date:
|
13
|
+
date: 2015-05-20 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: omniauth-oauth2
|
16
17
|
requirement: !ruby/object:Gem::Requirement
|
17
18
|
requirements:
|
18
|
-
- - ~>
|
19
|
+
- - "~>"
|
19
20
|
- !ruby/object:Gem::Version
|
20
21
|
version: 1.1.1
|
21
22
|
type: :runtime
|
22
23
|
prerelease: false
|
23
24
|
version_requirements: !ruby/object:Gem::Requirement
|
24
25
|
requirements:
|
25
|
-
- - ~>
|
26
|
+
- - "~>"
|
26
27
|
- !ruby/object:Gem::Version
|
27
28
|
version: 1.1.1
|
28
|
-
description:
|
29
|
+
description: OmniAuth strategy for clever.com SSO OAuth2 integration
|
29
30
|
email:
|
30
31
|
- cnichols@thinkthroughmath.com
|
32
|
+
- swati.aggarwal2412@gmail.com
|
31
33
|
executables: []
|
32
34
|
extensions: []
|
33
35
|
extra_rdoc_files: []
|
34
36
|
files:
|
35
|
-
- .gitignore
|
37
|
+
- ".gitignore"
|
36
38
|
- Gemfile
|
37
39
|
- LICENSE.txt
|
38
40
|
- README.md
|
@@ -43,7 +45,7 @@ files:
|
|
43
45
|
- lib/omniauth/clever/version.rb
|
44
46
|
- lib/omniauth/strategies/clever.rb
|
45
47
|
- omniauth-clever.gemspec
|
46
|
-
homepage: https://github.com/
|
48
|
+
homepage: https://github.com/clever/omniauth-clever
|
47
49
|
licenses:
|
48
50
|
- MIT
|
49
51
|
metadata: {}
|
@@ -53,17 +55,17 @@ require_paths:
|
|
53
55
|
- lib
|
54
56
|
required_ruby_version: !ruby/object:Gem::Requirement
|
55
57
|
requirements:
|
56
|
-
- -
|
58
|
+
- - ">="
|
57
59
|
- !ruby/object:Gem::Version
|
58
60
|
version: '0'
|
59
61
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
62
|
requirements:
|
61
|
-
- -
|
63
|
+
- - ">="
|
62
64
|
- !ruby/object:Gem::Version
|
63
65
|
version: '0'
|
64
66
|
requirements: []
|
65
67
|
rubyforge_project:
|
66
|
-
rubygems_version: 2.2.
|
68
|
+
rubygems_version: 2.2.2
|
67
69
|
signing_key:
|
68
70
|
specification_version: 4
|
69
71
|
summary: The unofficial strategy for authenticating people using clever.com to your
|