brycesch-devise_oauth2_providable 1.2.1 → 1.2.2

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: ff678f09826117ad5fa3565501da31b00c427530
4
- data.tar.gz: 756ae56d425b019a5d60f2d771f86b5c82f6995e
3
+ metadata.gz: e6e326eb53c592b6f71238d490ba036b3288b42a
4
+ data.tar.gz: 11ec8750713c7f0ef97fa6070e415837d66685e5
5
5
  SHA512:
6
- metadata.gz: 9e697c457bc740da9d6a911167b331e652d041a435c3cb133d6926d25e6410a996eaff1c2c6b4fc18053e27e471fd1470348fca23c296547aba3f66bb44fb212
7
- data.tar.gz: f1b15556ca8553705b3dd3b554860566c1cfe6808fdc508ad634fad31c6d3f425f29142003a662815f95fd00d9260799a99dda4f27d517f62d1dedbafe6bbf11
6
+ metadata.gz: ccd906373187384f8e3ca8e120f9a7b60ceba722e9a3814ed41922bbf59807b2a9852dd25fa7deedb458b677600305764d01466b7fa0fee9c5e2cc9677f4efb9
7
+ data.tar.gz: 34f5696ec1b7e9780bf94d52744fe27ff5b1a71695c9b25807e44b5e551cfb95d19bd8708f8f4d886cd57a68d75ff074d8bc02b98a3c1069f98dbf848dc14766
@@ -8,11 +8,13 @@ module Devise
8
8
  end
9
9
 
10
10
  def authenticate_grant_type(client)
11
- resource = mapping.to.find_for_database_authentication(mapping.to.authentication_keys.first => params[:username])
11
+ keys = mapping.to.authentication_keys
12
+ resource = mapping.to.find_for_database_authentication(keys.first => params[:username])
12
13
  if validate(resource) { resource.valid_password?(params[:password]) }
13
14
  success! resource
14
15
  else
15
- oauth_error! :invalid_grant, I18n.t("devise.failure.#{resource.unauthenticated_message}", authentication_keys: mapping.to.authentication_keys)
16
+ keys_string = keys.join(I18n.translate(:"support.array.words_connector"))
17
+ oauth_error! :invalid_grant, I18n.t("devise.failure.#{resource.unauthenticated_message}", authentication_keys: keys_string)
16
18
  end
17
19
  end
18
20
  end
@@ -1,5 +1,5 @@
1
1
  module Devise
2
2
  module Oauth2Providable
3
- VERSION = "1.2.1"
3
+ VERSION = "1.2.2"
4
4
  end
5
5
  end
@@ -17,7 +17,7 @@ en:
17
17
  unauthenticated: 'You need to sign in or sign up before continuing.'
18
18
  unconfirmed: 'You have to confirm your account before continuing.'
19
19
  locked: 'Your account is locked.'
20
- invalid: 'Invalid email or password.'
20
+ invalid: 'Invalid %{authentication_keys} or password.'
21
21
  invalid_token: 'Invalid authentication token.'
22
22
  timeout: 'Your session expired, please sign in again to continue.'
23
23
  inactive: 'Your account was not activated yet.'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brycesch-devise_oauth2_providable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Sonnek