driftrock-service 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@ module Driftrock::Service
2
2
  module DriftrockApp
3
3
 
4
4
  def authorise
5
- return unless should_authorise
5
+ return unless should_authorise?
6
6
  timestamp = params[:timestamp]
7
7
  company_id= params[:company_id]
8
8
  token = params[:token]
@@ -24,6 +24,12 @@ module Driftrock::Service
24
24
  has_auth_params || !has_session_data
25
25
  end
26
26
 
27
+ def token_for(timestamp, company_id)
28
+ OpenSSL::Digest::SHA1.hexdigest(
29
+ [timestamp,Driftrock::Service::Config.salt,company_id].join(":")
30
+ )
31
+ end
32
+
27
33
  def driftrock_app_status
28
34
  render text: "OK"
29
35
  end
@@ -33,11 +39,6 @@ module Driftrock::Service
33
39
  redirect_to Config.website_location+"/logout"
34
40
  end
35
41
 
36
- def token_for(timestamp, company_id)
37
- OpenSSL::Digest::SHA1.hexdigest(
38
- [timestamp,Driftrock::Service::Config.salt,company_id].join(":")
39
- )
40
- end
41
42
 
42
43
  end
43
44
  end
@@ -1,5 +1,5 @@
1
1
  module Driftrock
2
2
  module Service
3
- VERSION = "0.4.3"
3
+ VERSION = "0.4.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: driftrock-service
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.3
5
+ version: 0.4.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Max
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2013-06-04 00:00:00 Z
13
+ date: 2013-06-05 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty