Class: SmartId::AuthenticationCertificate::Certificate
- Inherits:
-
Object
- Object
- SmartId::AuthenticationCertificate::Certificate
- Defined in:
- lib/smart_id/authentication_certificate/certificate.rb
Instance Method Summary collapse
- #cert ⇒ Object
- #content ⇒ Object
-
#initialize(base64_cert) ⇒ Certificate
constructor
A new instance of Certificate.
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
#cert ⇒ Object
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 |
#content ⇒ Object
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 |