concerto_cas_auth 0.0.9 → 0.1.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: 5e695601f3786266ae7914bcf7f82ed91595b508
4
- data.tar.gz: 2ba282b068c16cf0354005e530db401c03f1a359
3
+ metadata.gz: 434410ee06c4af65197bda7521a14bead00c31b2
4
+ data.tar.gz: 1854d219dcb8970c91b044f617c74b9681bb4f69
5
5
  SHA512:
6
- metadata.gz: 79af688d03ce93a0dd6c4ffee8f3f49356cbe8d83a580030c91da5ee59b83f7cfbf3e1c259805db90de1e2dd12a29798344b80d15e339d1ccf52109a2a1d3c98
7
- data.tar.gz: 4a9cdabdaf9653e18150fdce2fe8d2942a7066b57b6766dbfcf0338c69aced148ec2319d100383d377f27856c13a387a334718dbcfafed859a55ece7181d60ae
6
+ metadata.gz: 6781b9c5d08a4965c4fb72903e3c5681e2720f2f9059a7524e84908fc2170a70e45571f0f0867dafc6eafeee6c4d5930eff72f794cafe8ebe30be625619a6f02
7
+ data.tar.gz: 74b44ec066089fd56df81d5cd584ab98117e94bfdbb73a22e3cc74b5cf852754505b724ffd25209f2fb295f45df504c02b0a4ae1f6443c928c1273c7ee24ecec
@@ -9,6 +9,7 @@ module ConcertoCasAuth
9
9
  def find_from_omniauth(cas_hash)
10
10
  # Get configuration options for customized CAS return value identifiers
11
11
  omniauth_keys = ConcertoCasAuth::Engine.config.omniauth_keys
12
+ cas_hash[omniauth_keys[:uid_key]].downcase!
12
13
 
13
14
  # Check if an identity records exists for the user attempting to sign in
14
15
  if identity = ConcertoIdentity::Identity.find_by_external_id(
@@ -1,3 +1,3 @@
1
1
  module ConcertoCasAuth
2
- VERSION = "0.0.9"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -0,0 +1,18 @@
1
+ namespace :concerto_cas_auth do
2
+ desc "Creates identities from existing user emails"
3
+ task :identity_from_email => :environment do
4
+ User.all.each do |u|
5
+ identity = ConcertoIdentity::Identity.new(
6
+ user_id: u.id,
7
+ external_id: u.email[/[^@]+/],
8
+ provider: "cas"
9
+ )
10
+
11
+ if identity.save
12
+ puts "Created Identity: #{identity.external_id} -> #{identity.user_id}"
13
+ else
14
+ puts "Error creating Identity for User #{identity.user_id}"
15
+ end
16
+ end
17
+ end
18
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: concerto_cas_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabe Perez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-13 00:00:00.000000000 Z
11
+ date: 2015-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -131,45 +131,45 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
131
  version: '0'
132
132
  requirements: []
133
133
  rubyforge_project:
134
- rubygems_version: 2.2.3
134
+ rubygems_version: 2.4.6
135
135
  signing_key:
136
136
  specification_version: 4
137
137
  summary: Provides user authentication using CAS
138
138
  test_files:
139
+ - test/integration/navigation_test.rb
140
+ - test/fixtures/concerto_cas_auth/identities.yml
141
+ - test/unit/concerto_cas_auth/identity_test.rb
139
142
  - test/concerto_cas_auth_test.rb
140
- - test/dummy/app/assets/javascripts/application.js
141
- - test/dummy/app/assets/stylesheets/application.css
143
+ - test/dummy/config.ru
144
+ - test/dummy/Rakefile
142
145
  - test/dummy/app/controllers/application_controller.rb
143
146
  - test/dummy/app/helpers/application_helper.rb
147
+ - test/dummy/app/assets/javascripts/application.js
148
+ - test/dummy/app/assets/stylesheets/application.css
144
149
  - test/dummy/app/views/layouts/application.html.erb
145
- - test/dummy/bin/bundle
146
- - test/dummy/bin/rails
147
150
  - test/dummy/bin/rake
148
- - test/dummy/config/application.rb
149
- - test/dummy/config/boot.rb
150
- - test/dummy/config/database.yml
151
- - test/dummy/config/environment.rb
152
- - test/dummy/config/environments/development.rb
153
- - test/dummy/config/environments/production.rb
151
+ - test/dummy/bin/rails
152
+ - test/dummy/bin/bundle
153
+ - test/dummy/README.rdoc
154
+ - test/dummy/config/locales/en.yml
154
155
  - test/dummy/config/environments/test.rb
155
- - test/dummy/config/initializers/backtrace_silencers.rb
156
- - test/dummy/config/initializers/cookies_serializer.rb
156
+ - test/dummy/config/environments/production.rb
157
+ - test/dummy/config/environments/development.rb
158
+ - test/dummy/config/environment.rb
159
+ - test/dummy/config/routes.rb
157
160
  - test/dummy/config/initializers/filter_parameter_logging.rb
158
- - test/dummy/config/initializers/inflections.rb
159
- - test/dummy/config/initializers/mime_types.rb
160
161
  - test/dummy/config/initializers/session_store.rb
162
+ - test/dummy/config/initializers/inflections.rb
163
+ - test/dummy/config/initializers/cookies_serializer.rb
164
+ - test/dummy/config/initializers/backtrace_silencers.rb
161
165
  - test/dummy/config/initializers/wrap_parameters.rb
162
- - test/dummy/config/locales/en.yml
163
- - test/dummy/config/routes.rb
166
+ - test/dummy/config/initializers/mime_types.rb
167
+ - test/dummy/config/application.rb
168
+ - test/dummy/config/database.yml
169
+ - test/dummy/config/boot.rb
164
170
  - test/dummy/config/secrets.yml
165
- - test/dummy/config.ru
166
171
  - test/dummy/public/404.html
172
+ - test/dummy/public/favicon.ico
167
173
  - test/dummy/public/422.html
168
174
  - test/dummy/public/500.html
169
- - test/dummy/public/favicon.ico
170
- - test/dummy/Rakefile
171
- - test/dummy/README.rdoc
172
- - test/fixtures/concerto_cas_auth/identities.yml
173
- - test/integration/navigation_test.rb
174
175
  - test/test_helper.rb
175
- - test/unit/concerto_cas_auth/identity_test.rb