omniauth-mastodon-st 0.9.7 → 0.9.15
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/lib/omniauth/mastodon/version.rb +1 -1
- data/lib/omniauth/strategies/mastodon.rb +28 -42
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0de0f37a299f481b698cd55c6541c7691f74fa3cdab727941996a294467812b0
|
4
|
+
data.tar.gz: 36b836b8054052e008299b0b48fd6ac359e3c2c3036b641318813a5c6a2237ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87686b666bf99ac9382f887ba610c9f8c220f99774c06a33e784f95e3e2e47bf73fbeb1877b15cd50353ff6144ac5846604dd3f54f4027c9495b22b659924f14
|
7
|
+
data.tar.gz: 92f4ab09366df0586e4a54897fad4b896a9cf6b1fa7d5ba2bd44dd5dd0f1c99c1ccd9cfc89447c0776e44287804bb3d9ad4d471608db880d7ca887924d9368d9
|
@@ -35,18 +35,11 @@ module OmniAuth
|
|
35
35
|
# Before we can redirect the user to authorize access, we must know where the user is from
|
36
36
|
# If the identifier param is not already present, a form will be shown for entering it
|
37
37
|
def request_phase
|
38
|
-
|
39
|
-
|
40
|
-
puts options[:domain]
|
41
|
-
puts options[:client_id]
|
42
|
-
puts options[:client_secret]
|
43
|
-
puts "++++++++++request_phase"
|
44
|
-
identifier ? start_oauth : get_identifier
|
38
|
+
# identifier ? start_oauth : get_identifier
|
39
|
+
start_oauth
|
45
40
|
end
|
46
41
|
|
47
42
|
def callback_phase
|
48
|
-
puts "++++++++++callback_phase"
|
49
|
-
puts identifier
|
50
43
|
set_options_from_identifier
|
51
44
|
super
|
52
45
|
end
|
@@ -57,9 +50,6 @@ module OmniAuth
|
|
57
50
|
|
58
51
|
def callback_url
|
59
52
|
full_host + script_name + callback_path
|
60
|
-
puts "++++++++++callback_url"
|
61
|
-
puts identifier
|
62
|
-
puts full_host + script_name + callback_path
|
63
53
|
end
|
64
54
|
|
65
55
|
def authorize_params
|
@@ -70,24 +60,24 @@ module OmniAuth
|
|
70
60
|
|
71
61
|
private
|
72
62
|
|
73
|
-
def get_identifier
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
end
|
81
|
-
|
82
|
-
def translate(t)
|
83
|
-
|
84
|
-
end
|
85
|
-
|
86
|
-
def locale
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
end
|
63
|
+
# def get_identifier
|
64
|
+
# I18n.with_locale(locale) do
|
65
|
+
# form = OmniAuth::Form.new(title: translate('.omniauth.mastodon.title'))
|
66
|
+
# form.text_field translate('.omniauth.mastodon.text'), 'identifier'
|
67
|
+
# form.button translate('.omniauth.mastodon.button')
|
68
|
+
# form.to_response
|
69
|
+
# end
|
70
|
+
# end
|
71
|
+
|
72
|
+
# def translate(t)
|
73
|
+
# I18n.exists?(t) ? I18n.t(t) : I18n.t(t, locale: :en)
|
74
|
+
# end
|
75
|
+
|
76
|
+
# def locale
|
77
|
+
# loc = request.params['locale'] || session[:omniauth_login_locale] || I18n.default_locale
|
78
|
+
# loc = :en unless I18n.locale_available?(loc)
|
79
|
+
# loc
|
80
|
+
# end
|
91
81
|
|
92
82
|
def start_oauth
|
93
83
|
set_options_from_identifier
|
@@ -103,18 +93,14 @@ module OmniAuth
|
|
103
93
|
end
|
104
94
|
|
105
95
|
def set_options_from_identifier
|
106
|
-
username, domain = identifier.split('@')
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
options.identifier = identifier
|
115
|
-
options.client_options[:site] = "https://#{domain}"
|
116
|
-
options.client_id = client_id
|
117
|
-
options.client_secret = client_secret
|
96
|
+
# username, domain = identifier.split('@')
|
97
|
+
domain = options[:domain]
|
98
|
+
# client_id, client_secret = options.credentials.call(domain, callback_url)
|
99
|
+
# options.identifier = identifier
|
100
|
+
# options.client_options[:site] = "http://#{domain}"
|
101
|
+
options.client_options[:site] = domain
|
102
|
+
# options.client_id = client_id
|
103
|
+
# options.client_secret = client_secret
|
118
104
|
end
|
119
105
|
end
|
120
106
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-mastodon-st
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eugen Rochko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|