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: 2616ca82fd0778b03efe16f617048f00d06306695be3c5f269299d23cd4f1d50
4
- data.tar.gz: c0877dd71503826030c4c679a6cd4139f658ee1be5c643ba2389e2fab9120812
3
+ metadata.gz: b1ad0732c58c2aea200daefc4fa356863cd200bec250dacb6daa04d0185ff51f
4
+ data.tar.gz: 4045f3010b507092e6afab4ebe7e1b46a68f0b63adcf3910e18ddffcb68f2b86
5
5
  SHA512:
6
- metadata.gz: f6e170db4dd20e031d29135a962388ba4a83ec6ea3ae460a180763d9416f9f7e7215b0b152c2c10df202a9e20c31cca0a10fe10d26c0b93ff7f6b8b145a568f3
7
- data.tar.gz: '000585f7ae8e44ba54ab52c15accfbc8bc689bc1a21cad5964353f7ddac9e3ce5774e50fe5b1b910b768f1d83200155d1e6b044856d929ef288939d4ca4ea945'
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Authkeeper
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
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.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-20 00:00:00.000000000 Z
11
+ date: 2024-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails