omniauth-atproto 0.1.3 → 0.1.4

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: bc86c1376053df62fcdc24db7d18eb370727215726af22bb2780a6c36f4f85f3
4
- data.tar.gz: 28c3f9a7e1240b04121e859e913f9feb21fe69394d3e745d6fe4960e71d3ed88
3
+ metadata.gz: 4f160f72bb32ee424debc508de26eb57909a0099dd843514c4787f925ab49339
4
+ data.tar.gz: e17bf34036b05597a16b25aec8003fce7422fe511ae3c82074144b5546f8cc16
5
5
  SHA512:
6
- metadata.gz: 4941f9b4bf7355f2881a779210d65070311d920fa708e9afbb1201510c114d13c2c4d41fa9e55f6631795090d73062d446db42be816c6b4d33316057e73ce164
7
- data.tar.gz: 60e567ef2f1fba250cf59211f2e9b1f174741103527f74c989dd2807236871ea513633c8d60bb36a793cf9d0e84bc9b4436d8c18ef25797a4eb5b3dd12fbd7f0
6
+ metadata.gz: c88cd60ddba8dcb55801fc80ef932ccdfea21fdcb6bc4f9e646f6bf5cd1185608bd497a6ce9a55547c3a03fd7920191c482a89a795b0ba3b5ef0fbb813ebbd64
7
+ data.tar.gz: ff8baae3478d2ad51e8291252a0d08a5552631ff692416ffc40b26fa0d65e4b2bc73b8861aa8fc2d0e89094076b5eb24ce56a38538ab7d69dd06a386f18aac64
data/README.md CHANGED
@@ -78,7 +78,7 @@ rails atproto:generate_metadata
78
78
  ```
79
79
  The values from the metadata endpoint should correspond to those you gave as option for the strategy (that's why a generator would be very handy).
80
80
 
81
- All subsequent request made with the token should use the same private_key (with dpop, see the atproto_client gem).
81
+ All subsequent request made with the token should use the same private_key (with dpop), you might want to use https://github.com/lasercatspro/atproto-ruby.
82
82
 
83
83
  The pds is going to request your app at oauth/client-metadata.json. For developement you will have to use some kind of proxy, like ngrok (there is a "development mode" in the spec but I didnt try it)
84
84
 
@@ -21,29 +21,28 @@ module OmniAuth
21
21
 
22
22
  def self.setup
23
23
  lambda do |env|
24
- session = env['rack.session']
24
+ session = env["rack.session"]
25
25
 
26
- if env['rack.request.form_hash'] && handle = env['rack.request.form_hash']['handle']
26
+ if env["rack.request.form_hash"] && handle = env["rack.request.form_hash"]["handle"]
27
27
  resolver = DIDKit::Resolver.new
28
28
  did = resolver.resolve_handle(handle)
29
29
 
30
30
  unless did
31
31
  env['omniauth.strategy'].fail!(:unknown_handle,
32
- OmniAuth::Error.new(
33
- 'Handle parameter did not resolve to a did'
34
- ))
32
+ OmniAuth::Error.new(
33
+ 'Handle parameter did not resolve to a did'
34
+ ))
35
35
  end
36
36
 
37
37
  endpoint = resolver.resolve_did(did).pds_endpoint
38
38
  auth_server = get_authorization_server(endpoint)
39
- session['authorization_info'] = authorization_info = get_authorization_data(auth_server)
39
+ session["authorization_info"] = authorization_info = get_authorization_data(auth_server)
40
40
  end
41
-
42
- if authorization_info ||= session.delete('authorization_info')
43
- env['omniauth.strategy'].options['client_options']['site'] = authorization_info['issuer']
44
- env['omniauth.strategy'].options['client_options']['authorize_url'] =
45
- authorization_info['authorization_endpoint']
46
- env['omniauth.strategy'].options['client_options']['token_url'] = authorization_info['token_endpoint']
41
+
42
+ if authorization_info ||= session.delete("authorization_info")
43
+ env['omniauth.strategy'].options["client_options"]["site"] = authorization_info["issuer"]
44
+ env['omniauth.strategy'].options["client_options"]["authorize_url"] = authorization_info['authorization_endpoint']
45
+ env['omniauth.strategy'].options["client_options"]["token_url"] = authorization_info['token_endpoint']
47
46
  end
48
47
  end
49
48
  end
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Atproto
3
- VERSION = '0.1.3'
3
+ VERSION = '0.1.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-atproto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - frabr
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-12-12 00:00:00.000000000 Z
10
+ date: 1980-01-01 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: atproto_client
@@ -56,14 +55,14 @@ dependencies:
56
55
  name: jwt
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
- - - "~>"
58
+ - - ">="
60
59
  - !ruby/object:Gem::Version
61
60
  version: '2.7'
62
61
  type: :runtime
63
62
  prerelease: false
64
63
  version_requirements: !ruby/object:Gem::Requirement
65
64
  requirements:
66
- - - "~>"
65
+ - - ">="
67
66
  - !ruby/object:Gem::Version
68
67
  version: '2.7'
69
68
  - !ruby/object:Gem::Dependency
@@ -143,7 +142,6 @@ metadata:
143
142
  homepage_uri: https://github.com/lasercats/omniauth-atproto
144
143
  source_code_uri: https://github.com/lasercats/omniauth-atproto
145
144
  changelog_uri: https://github.com/lasercats/omniauth-atproto/blob/master/CHANGELOG.md
146
- post_install_message:
147
145
  rdoc_options: []
148
146
  require_paths:
149
147
  - lib
@@ -158,8 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
156
  - !ruby/object:Gem::Version
159
157
  version: '0'
160
158
  requirements: []
161
- rubygems_version: 3.5.3
162
- signing_key:
159
+ rubygems_version: 3.7.2
163
160
  specification_version: 4
164
161
  summary: OmniAuth strategy for AtProto
165
162
  test_files: []