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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c278bceb7fe8ef155caa37fc482af11b62b3245124621163856de6be5384f52a
4
- data.tar.gz: febd54f402679648c40bdfbf91b98a5ef8520fdc922bd6f2ed527d87028b772b
3
+ metadata.gz: 0de0f37a299f481b698cd55c6541c7691f74fa3cdab727941996a294467812b0
4
+ data.tar.gz: 36b836b8054052e008299b0b48fd6ac359e3c2c3036b641318813a5c6a2237ec
5
5
  SHA512:
6
- metadata.gz: 917530397b92818fccf63a796dac5fbbe933da47b907b402cc60f1a103bb65fde93bad78dd4b71882145bd5320b63588c76e224899bcecf3eb2a71f35ff822a6
7
- data.tar.gz: 8efe0fcc741a526d7b174f5788cb316fb2f5da9e4fe76834acd121b6970a6e193fefe99434f6e44ddc6a08b34ddbb7953a25aa01034fb30b5147937f30af380a
6
+ metadata.gz: 87686b666bf99ac9382f887ba610c9f8c220f99774c06a33e784f95e3e2e47bf73fbeb1877b15cd50353ff6144ac5846604dd3f54f4027c9495b22b659924f14
7
+ data.tar.gz: 92f4ab09366df0586e4a54897fad4b896a9cf6b1fa7d5ba2bd44dd5dd0f1c99c1ccd9cfc89447c0776e44287804bb3d9ad4d471608db880d7ca887924d9368d9
@@ -12,7 +12,7 @@ module OmniAuth
12
12
  end
13
13
 
14
14
  def patch
15
- 7
15
+ 15
16
16
  end
17
17
 
18
18
  def pre
@@ -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
- puts "++++++++++request_phase"
39
- puts identifier
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
- I18n.with_locale(locale) do
75
- form = OmniAuth::Form.new(title: translate('.omniauth.mastodon.title'))
76
- form.text_field translate('.omniauth.mastodon.text'), 'identifier'
77
- form.button translate('.omniauth.mastodon.button')
78
- form.to_response
79
- end
80
- end
81
-
82
- def translate(t)
83
- I18n.exists?(t) ? I18n.t(t) : I18n.t(t, locale: :en)
84
- end
85
-
86
- def locale
87
- loc = request.params['locale'] || session[:omniauth_login_locale] || I18n.default_locale
88
- loc = :en unless I18n.locale_available?(loc)
89
- loc
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
- client_id, client_secret = options.credentials.call(domain, callback_url)
108
- puts "*-**-*"
109
- puts username
110
- puts domain
111
- puts client_id
112
- puts client_secret
113
- puts "*-**-*"
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.7
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-15 00:00:00.000000000 Z
11
+ date: 2021-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth