authkeeper 0.1.1 → 0.1.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1ad0732c58c2aea200daefc4fa356863cd200bec250dacb6daa04d0185ff51f
|
4
|
+
data.tar.gz: 4045f3010b507092e6afab4ebe7e1b46a68f0b63adcf3910e18ddffcb68f2b86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9c24eb314938054584b1e2c9e1e84fd24fb9738150d737b3e567caf992fc30ed911d28446874002444236f916917505bf790d6a522094a53f5e34f84f8d678f
|
7
|
+
data.tar.gz: a1430eedecc606ba84cbc78aeb719fe3af468abac86a5637d307f694597b5c3b38ace2dc7b1a8f680dc2ca3e57a524d4b01bbdfac6f1167207fae466393a97e5
|
@@ -55,14 +55,5 @@ module Authkeeper
|
|
55
55
|
def provider_service(provider)
|
56
56
|
Authkeeper::Container.resolve("services.providers.#{provider}")
|
57
57
|
end
|
58
|
-
|
59
|
-
def sign_in(user)
|
60
|
-
user_session = Authkeeper.configuration.user_session_model.constantize.create!(user: user)
|
61
|
-
cookies[Authkeeper.configuration.access_token_name] = {
|
62
|
-
value: generate_token.call(user_session: user_session)[:result],
|
63
|
-
domain: Authkeeper.configuration.domain,
|
64
|
-
expires: 1.week.from_now
|
65
|
-
}.compact
|
66
|
-
end
|
67
58
|
end
|
68
59
|
end
|
@@ -49,6 +49,15 @@ module Authkeeper
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def access_token_name = Authkeeper.configuration.access_token_name
|
52
|
+
|
53
|
+
def sign_in(user)
|
54
|
+
user_session = Authkeeper.configuration.user_session_model.constantize.create!(user: user)
|
55
|
+
cookies[Authkeeper.configuration.access_token_name] = {
|
56
|
+
value: Authkeeper::Container['services.generate_token'].call(user_session: user_session)[:result],
|
57
|
+
domain: Authkeeper.configuration.domain,
|
58
|
+
expires: 1.week.from_now
|
59
|
+
}.compact
|
60
|
+
end
|
52
61
|
end
|
53
62
|
end
|
54
63
|
end
|
data/lib/authkeeper/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authkeeper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bogdanov Anton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|