omniauth-clever 1.1.0 → 1.2.0

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: 466f1d215467607523f0e1d0b831d39006e3f3a3
4
- data.tar.gz: 83abc68cdbc414e860b9c2dd3d60afda9bd87619
3
+ metadata.gz: 458dce33b0c16ae69f770ac1f759d070ecb339a5
4
+ data.tar.gz: 2484de2c25fa6c9cf24058abef451a32cb504565
5
5
  SHA512:
6
- metadata.gz: 4f3c112e9e3afbb6dccc78e51f82980ccf9668ad73ce53817b59d72d60e358598afa74d707c670b202cfdaf9a4d318b742d21a0fbe8ee219b45d2866a4049c24
7
- data.tar.gz: c1d140d42ef890a0b89f1c3b0dcfd252c78d43f10fb46b0b255ac4a64628ceb968f11348846798a7584bc623103a769f7e14a75ef05b71b1ac7bc6d740ab8744
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/developers/docs/oauth) integration.
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.1.0'
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 `clever_landing` or `dev` parameters on a
34
- per-request basis by passing these params to your `/auth/clever` url, use
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][:clever_landing] = params['clever_landing']
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!
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Clever
3
- VERSION = "1.1.0"
3
+ VERSION = "1.2.0"
4
4
  end
5
5
  end
@@ -8,24 +8,13 @@ module OmniAuth
8
8
 
9
9
  option :client_options, {
10
10
  :site => 'https://api.clever.com',
11
- :authorize_url => 'https://account.clever.com/oauth/authorize',
12
- :token_url => 'https://api.clever.com/oauth/token'
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.encode64(username_password)}"}
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
@@ -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{Unofficial OmniAuth strategy for clever.com SSO OAuth2 integration}
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/thinkthroughmath/omniauth-clever"
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.1.0
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: 2014-07-08 00:00:00.000000000 Z
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: Unofficial OmniAuth strategy for clever.com SSO OAuth2 integration
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/thinkthroughmath/omniauth-clever
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.0
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