omniauth-tinkoff-id 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/README.md +3 -3
- data/lib/omniauth/strategies/tinkoff_id.rb +4 -4
- data/lib/omniauth/tinkoff_id/version.rb +1 -1
- data/omniauth-tinkoff-id.gemspec +1 -1
- data/spec/omniauth/strategies/tinkoff_id_spec.rb +2 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59b4b8b1e9b85c537d3e1420b327522c38688ee2f132cda3cac20b60fee93895
|
4
|
+
data.tar.gz: 4b2c89b2232c6d9d8c974a7c7c1239935e4721625d01d8f499428be09b11db6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a31cda8a41ff14c485dff018a662c4090b647a04b8e28e29c7d733eb1a781d8390c937043f9a0da44824a1eb367e94a4115bd187333ea1cca9a25a2f6d46500f
|
7
|
+
data.tar.gz: cdd2b7ac284b2368e965c4b4cb444d816f1c03adcc22c03a9fdd58d6b7a1213c56865f3a4586f6b72a2b58436b1b319a6d955e8103bb21d1fd28018bb402b90d
|
data/.rubocop.yml
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# T-Id OAuth strategy for OmniAuth
|
2
2
|
|
3
3
|
[](https://github.com/foxford/omniauth-tinkoff-id/actions/workflows/main.yml)
|
4
4
|
|
@@ -18,7 +18,7 @@ This gem already added.
|
|
18
18
|
|
19
19
|
gem "omniauth-tinkoff-id"
|
20
20
|
|
21
|
-
[Join](https://
|
21
|
+
[Join](https://developer.tbank.ru/docs/intro/partner/tid) to TinkoffId
|
22
22
|
|
23
23
|
### Usage
|
24
24
|
|
@@ -74,4 +74,4 @@ This project is licensed under the [MIT License](LICENSE.txt).
|
|
74
74
|
|
75
75
|
## Acknowledgments
|
76
76
|
|
77
|
-
* https://
|
77
|
+
* https://developer.tbank.ru/docs/intro/partner/tid
|
@@ -4,13 +4,13 @@ require 'omniauth/strategies/oauth2'
|
|
4
4
|
|
5
5
|
module OmniAuth
|
6
6
|
module Strategies
|
7
|
-
# Authenticate to
|
8
|
-
# https://
|
7
|
+
# Authenticate to T-ID utilizing OAuth 2.0
|
8
|
+
# https://developer.tbank.ru/docs/api/t-id
|
9
9
|
class TinkoffId < OmniAuth::Strategies::OAuth2
|
10
10
|
option :name, 'tinkoff_id'
|
11
11
|
|
12
12
|
option :client_options, {
|
13
|
-
site: 'https://id.
|
13
|
+
site: 'https://id.tbank.ru',
|
14
14
|
token_url: '/auth/token',
|
15
15
|
authorize_url: '/auth/authorize',
|
16
16
|
auth_scheme: :basic_auth
|
@@ -64,7 +64,7 @@ module OmniAuth
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def connection
|
67
|
-
@connection ||= Faraday.new('https://id.
|
67
|
+
@connection ||= Faraday.new('https://id.tbank.ru') do |conn|
|
68
68
|
conn.request :url_encoded
|
69
69
|
conn.request :authorization, 'Bearer', access_token.token
|
70
70
|
conn.response :json
|
data/omniauth-tinkoff-id.gemspec
CHANGED
@@ -16,5 +16,5 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
17
17
|
spec.files = `git ls-files`.split("\n")
|
18
18
|
spec.require_paths = ['lib']
|
19
|
-
spec.
|
19
|
+
spec.add_dependency 'omniauth-oauth2', '>= 1.5', '<= 1.8.0'
|
20
20
|
end
|
@@ -28,7 +28,7 @@ describe OmniAuth::Strategies::TinkoffId do
|
|
28
28
|
|
29
29
|
describe '#client_options' do
|
30
30
|
it 'has correct site' do
|
31
|
-
expect(subject.client.site).to eq('https://id.
|
31
|
+
expect(subject.client.site).to eq('https://id.tbank.ru')
|
32
32
|
end
|
33
33
|
|
34
34
|
it 'has correct authorize_url' do
|
@@ -129,7 +129,7 @@ describe OmniAuth::Strategies::TinkoffId do
|
|
129
129
|
end
|
130
130
|
|
131
131
|
before do
|
132
|
-
stub_request(:post, 'https://id.
|
132
|
+
stub_request(:post, 'https://id.tbank.ru/userinfo/userinfo')
|
133
133
|
.with(
|
134
134
|
body: { 'client_id' => 'client_id', 'client_secret' => 'client_secret' },
|
135
135
|
headers: {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-tinkoff-id
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yury Druzhkov
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
- - "<="
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.8.0
|
33
|
-
description:
|
33
|
+
description:
|
34
34
|
email:
|
35
35
|
- bad1lamer@gmail.com
|
36
36
|
executables: []
|
@@ -57,7 +57,7 @@ homepage: https://github.com/foxford/omniauth-tinkoff-id
|
|
57
57
|
licenses:
|
58
58
|
- MIT
|
59
59
|
metadata: {}
|
60
|
-
post_install_message:
|
60
|
+
post_install_message:
|
61
61
|
rdoc_options: []
|
62
62
|
require_paths:
|
63
63
|
- lib
|
@@ -72,8 +72,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: '0'
|
74
74
|
requirements: []
|
75
|
-
rubygems_version: 3.
|
76
|
-
signing_key:
|
75
|
+
rubygems_version: 3.5.11
|
76
|
+
signing_key:
|
77
77
|
specification_version: 4
|
78
78
|
summary: TinkoffId OAuth2 Strategy for OmniAuth
|
79
79
|
test_files: []
|