Class: SmartId::AuthenticationCertificate::Certificate

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

Instance Method Summary collapse

Constructor Details

#initialize(base64_cert) ⇒ Certificate

Returns a new instance of Certificate.



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

def initialize(base64_cert)
  @base64_cert = base64_cert
end

Instance Method Details

#certObject



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

def cert
  @cert ||= OpenSSL::X509::Certificate.new(Base64.decode64(@base64_cert))
end

#contentObject



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

def content
  @content ||= SmartId::AuthenticationCertificate::Content.new(cert.subject.to_s)
end