apple_id 1.4.0 → 1.4.1
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/VERSION +1 -1
- data/lib/apple_id/event_token.rb +5 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 535212dfcb103a30e0977d80a0d5b8bd21d8ce25ccd0d13bf450542ba706473b
|
4
|
+
data.tar.gz: df08efbc2cc0de63e9645e8d4aa9a63c5f7a632b3b61fcd27f30c47cab52c673
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 067b35d844a7e2a2c802d0823c5ef2572e4b2d1515b7b9756c3b6393ebc0633074708656fc42d89ed7522acd69fb0d377102e770e643fe31ad6eb0cc394c0d64
|
7
|
+
data.tar.gz: 13439c70fc5982bd0576645b1411979f74b2adf4df0252e05fe03c55a691a218f2d0d63ae363a0e27c434abcf26dd9a9450c42e5ffb15e5388deb2344987ede9
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.4.
|
1
|
+
1.4.1
|
data/lib/apple_id/event_token.rb
CHANGED
@@ -2,19 +2,18 @@ module AppleID
|
|
2
2
|
class EventToken < OpenIDConnect::ConnectObject
|
3
3
|
class VerificationFailed < Error; end
|
4
4
|
|
5
|
-
|
6
|
-
# Once they start returning an array of events, this gem might use `events` as the attribute name.
|
7
|
-
attr_required :iss, :aud, :exp, :iat, :jti, :event
|
5
|
+
attr_required :iss, :aud, :exp, :iat, :jti, :events
|
8
6
|
alias_method :original_jwt, :raw_attributes
|
7
|
+
alias_method :event, :events
|
9
8
|
|
10
9
|
def initialize(attributes = {})
|
11
10
|
super
|
12
|
-
@
|
11
|
+
@events = Event.decode attributes[:events]
|
13
12
|
end
|
14
13
|
|
15
14
|
def verify!(verify_signature: true, client: nil)
|
16
15
|
verify_signature! if verify_signature
|
17
|
-
verify_claims! client
|
16
|
+
verify_claims! client
|
18
17
|
self
|
19
18
|
end
|
20
19
|
|
@@ -32,7 +31,7 @@ module AppleID
|
|
32
31
|
raise VerificationFailed, 'Signature Verification Failed'
|
33
32
|
end
|
34
33
|
|
35
|
-
def verify_claims!(client
|
34
|
+
def verify_claims!(client)
|
36
35
|
aud = if client.respond_to?(:identifier)
|
37
36
|
client.identifier
|
38
37
|
else
|