14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/messages/fact_response.rb', line 14
def parse(input)
@input = input
@typ = MSG_TYPE
@payload = get_payload input
@id = payload[:cid]
@from = payload[:iss]
@to = payload[:sub]
@expires = ::Time.parse(payload[:exp])
@issued = ::Time.parse(payload[:iat])
@audience = payload[:aud]
@status = payload[:status]
@facts = []
payload[:facts] = [] if payload[:facts].nil?
payload[:facts].each do |f|
begin
fact = SelfSDK::Messages::Fact.new(@messaging)
fact.parse(f)
@facts.push(fact)
rescue StandardError => e
SelfSDK.logger.info e.message
end
end
end
|