Class: InformationCard::Processor

Inherits:
Object
  • Object
show all
Defined in:
lib/information_card/processor.rb

Class Method Summary collapse

Class Method Details

.process(encrypted_information_card_xml) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/information_card/processor.rb', line 3

def self.process(encrypted_information_card_xml)
  begin    
    decrypter = Decrypter.new(encrypted_information_card_xml, 
                              InformationCard::Config.certificate_location, 
                              InformationCard::Config.certificate_subject)
    decrypted_information_card = decrypter.decrypt
  rescue => e
    return InvalidToken.new({:decryption => e.message})
  end              
  SamlToken.create(decrypted_information_card)
end