authkeeper 0.1.0 → 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: 1d291c37e7026099622fefe84c63a02de6cef06daa7eee635f36b796db5c7aa9
4
- data.tar.gz: 907a89191c1c28605281792a51e5152ff8d3a6772d2bd9b1b9123a4cce7a9d24
3
+ metadata.gz: b1ad0732c58c2aea200daefc4fa356863cd200bec250dacb6daa04d0185ff51f
4
+ data.tar.gz: 4045f3010b507092e6afab4ebe7e1b46a68f0b63adcf3910e18ddffcb68f2b86
5
5
  SHA512:
6
- metadata.gz: accb54c1f14af1647d1ec78ce89cb6497b68086bf413e14fbd0f84a157eb85756fd7bdbc7059fd2428b906f8581a36f5b6d8d2327b2ab6c73bd782197a2558e3
7
- data.tar.gz: cafb801a5ad8b25a840d6bf499eca9b6f8593eac07b6b446fd6b565cb71ddd864c2e11bbdec959933fe48e2c6e0ead259cf844098677f1c4b80e935c334ae932
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
@@ -3,7 +3,7 @@
3
3
  module Authkeeper
4
4
  module Providers
5
5
  class Yandex
6
- include Deps[
6
+ include AuthkeeperDeps[
7
7
  auth_client: 'api.yandex.auth_client',
8
8
  api_client: 'api.yandex.client'
9
9
  ]
@@ -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.0'
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.0
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