agilib 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/agilib/tokens_controller.rb +5 -5
- data/lib/agilib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 189bdf1f51474c316ab63deca338df69327b94e6
|
4
|
+
data.tar.gz: d3e671ce9629dd9785f46189d632dc4c99ccfaca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 759fd4250a1f4f45acd1d1da2173b35a444ed028a49027a085db5b826dec88a25709a4b745f844c135749867cbd07fc53bdf396452ca0bfe0b2761202a34b0d5
|
7
|
+
data.tar.gz: 719ed059848d95ce980ea54e8e70600f6909d0b428e70890ab0ceaaa5c88e2a7c2f99fd11caa8a68faa84df6ec68bce80cc3d1bbcb13457399302d6dbdff3b93
|
@@ -13,12 +13,12 @@ module Agilib
|
|
13
13
|
password = params[Agilib::TokenAuthenticatable.login_params[:password]]
|
14
14
|
|
15
15
|
if request.format != :json
|
16
|
-
render :status=>406, :json => { :message => "The request must be json" }
|
16
|
+
render :status=>406, :json => { :message => t('agilib.token_authenticatable.format_error', :default => "The request must be json") }
|
17
17
|
return
|
18
18
|
end
|
19
19
|
|
20
20
|
if login.nil? or password.nil?
|
21
|
-
render :status=>400, :json=>{ :message => "The request must contain the user login and password." }
|
21
|
+
render :status=>400, :json=>{ :message => t('agilib.token_authenticatable.request_login_and_password', :default => "The request must contain the user login and password.") }
|
22
22
|
return
|
23
23
|
end
|
24
24
|
|
@@ -29,7 +29,7 @@ module Agilib
|
|
29
29
|
end
|
30
30
|
|
31
31
|
if @user.nil?
|
32
|
-
render :status=>401, :json=>{:message=>"Invalid login or passoword."}
|
32
|
+
render :status=>401, :json=>{:message=>t('agilib.token_authenticatable.invalid_login_or_password', :default => "Invalid login or passoword.")}
|
33
33
|
return
|
34
34
|
end
|
35
35
|
|
@@ -37,7 +37,7 @@ module Agilib
|
|
37
37
|
@user.save!
|
38
38
|
|
39
39
|
if not @user.valid_password?(password)
|
40
|
-
render :status=> 401, :json=>{:message=>"Invalid login or passoword."}
|
40
|
+
render :status=> 401, :json=>{:message=>t('agilib.token_authenticatable.invalid_login_or_password', :default => "Invalid login or passoword.")}
|
41
41
|
else
|
42
42
|
render :status=>200, :json=>{:user=> @user, :token => @user.authentication_token}
|
43
43
|
end
|
@@ -54,7 +54,7 @@ module Agilib
|
|
54
54
|
end
|
55
55
|
|
56
56
|
if @user.nil?
|
57
|
-
render :status=>404, :json=>{:message=>"Invalid
|
57
|
+
render :status=>404, :json=>{:message=>t('agilib.token_authenticatable.invalid_token', :default => "Invalid Token")}
|
58
58
|
else
|
59
59
|
@user.authentication_token = ""
|
60
60
|
@user.save!
|
data/lib/agilib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: agilib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcos Junior
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: executable-hooks
|