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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6e326eb53c592b6f71238d490ba036b3288b42a
|
4
|
+
data.tar.gz: 11ec8750713c7f0ef97fa6070e415837d66685e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
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
|
@@ -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
|
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.'
|