Class: SmartId::AuthenticationCertificate::Content

Inherits:
Object
  • Object
show all
Defined in:
lib/smart_id/authentication_certificate/content.rb

Instance Method Summary collapse

Constructor Details

#initialize(raw_content) ⇒ Content

Returns a new instance of Content.



4
5
6
# File 'lib/smart_id/authentication_certificate/content.rb', line 4

def initialize(raw_content)
  @raw_content = raw_content
end

Instance Method Details

#all_infoObject



20
21
22
# File 'lib/smart_id/authentication_certificate/content.rb', line 20

def all_info
  structured_raw_content["CN"]
end

#countryObject



16
17
18
# File 'lib/smart_id/authentication_certificate/content.rb', line 16

def country
  structured_raw_content["C"].gsub(",", " ")
end

#given_nameObject



8
9
10
# File 'lib/smart_id/authentication_certificate/content.rb', line 8

def given_name
  structured_raw_content["GN"].gsub(",", " ")
end

#organizational_unitObject



24
25
26
# File 'lib/smart_id/authentication_certificate/content.rb', line 24

def organizational_unit
  structured_raw_content["OU"]
end

#serial_numberObject



28
29
30
# File 'lib/smart_id/authentication_certificate/content.rb', line 28

def serial_number
  structured_raw_content["serialNumber"]
end

#surnameObject



12
13
14
# File 'lib/smart_id/authentication_certificate/content.rb', line 12

def surname
  structured_raw_content["SN"].gsub(",", " ")
end