katoadhoc 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/katoadhoc.rb +6 -2
  2. metadata +1 -1
data/lib/katoadhoc.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'jwt'
2
2
  class KatoAdhoc
3
- def self.setInfo(response, skey, expiration_seconds, user_id, user_name, room_id, room_name)
3
+ def self.setInfo(cookies, skey, expiration_seconds, user_id, user_name, room_id, room_name)
4
4
  token = JWT.encode({
5
5
  "exp"=>(((Time.now.to_f * 1000).to_i) + expiration_seconds.to_i),
6
6
  "user_id"=>user_id,
@@ -9,6 +9,10 @@ class KatoAdhoc
9
9
  "room_name"=>room_name
10
10
  }, skey)
11
11
 
12
- response.cookies[:KATO_ADHOC_TOKEN] = token
12
+ cookies[:KATO_ADHOC_TOKEN] = token
13
+ end
14
+
15
+ def self.unset(cookies)
16
+ cookies.delete :KATO_ADHOC_TOKEN
13
17
  end
14
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katoadhoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: