selfsdk 0.0.195 → 0.0.198

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.
@@ -1,31 +0,0 @@
1
- # Copyright 2020 Self Group Ltd. All Rights Reserved.
2
-
3
- # frozen_string_literal: true
4
-
5
- require_relative 'base'
6
- require_relative '../ntptime'
7
-
8
- module SelfSDK
9
- module Messages
10
- class AuthenticationMessage < Base
11
-
12
- def parse(input, envelope=nil)
13
- @input = input
14
- @typ = @typ
15
- @payload = get_payload input
16
- @id = payload[:cid]
17
- @from = payload[:iss]
18
- @to = payload[:sub]
19
- @audience = payload[:aud]
20
- @from_device = payload[:device_id]
21
- @expires = ::Time.parse(payload[:exp])
22
- @issued = ::Time.parse(payload[:iat])
23
- @status = payload[:status]
24
- if envelope
25
- issuer = envelope.sender.split(":")
26
- @from_device = issuer.last
27
- end
28
- end
29
- end
30
- end
31
- end
@@ -1,25 +0,0 @@
1
- # Copyright 2020 Self Group Ltd. All Rights Reserved.
2
-
3
- # frozen_string_literal: true
4
-
5
- require_relative 'base'
6
- require_relative '../ntptime'
7
- require_relative 'authentication_message'
8
-
9
- module SelfSDK
10
- module Messages
11
- class AuthenticationResp < AuthenticationMessage
12
- MSG_TYPE = "identities.authenticate.resp"
13
- def initialize(messaging)
14
- @typ = MSG_TYPE
15
- super
16
- end
17
-
18
- protected
19
-
20
- def proto(to_device)
21
- nil
22
- end
23
- end
24
- end
25
- end