Class: WebAuthn::AttestationStatement::Apple
- Inherits:
-
WebAuthn::AttestationStatement
- Object
- WebAuthn::AttestationStatement
- WebAuthn::AttestationStatement::Apple
- Defined in:
- lib/web_authn/attestation_statement/apple.rb
Constant Summary collapse
- CERTIFICATE_EXTENSION_OID =
'1.2.840.113635.100.8.2'- ROOT_CERTIFICATE =
"-----BEGIN CERTIFICATE-----\nMIICEjCCAZmgAwIBAgIQaB0BbHo84wIlpQGUKEdXcTAKBggqhkjOPQQDAzBLMR8w\nHQYDVQQDDBZBcHBsZSBXZWJBdXRobiBSb290IENBMRMwEQYDVQQKDApBcHBsZSBJ\nbmMuMRMwEQYDVQQIDApDYWxpZm9ybmlhMB4XDTIwMDMxODE4MjEzMloXDTQ1MDMx\nNTAwMDAwMFowSzEfMB0GA1UEAwwWQXBwbGUgV2ViQXV0aG4gUm9vdCBDQTETMBEG\nA1UECgwKQXBwbGUgSW5jLjETMBEGA1UECAwKQ2FsaWZvcm5pYTB2MBAGByqGSM49\nAgEGBSuBBAAiA2IABCJCQ2pTVhzjl4Wo6IhHtMSAzO2cv+H9DQKev3//fG59G11k\nxu9eI0/7o6V5uShBpe1u6l6mS19S1FEh6yGljnZAJ+2GNP1mi/YK2kSXIuTHjxA/\npcoRf7XkOtO4o1qlcaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUJtdk\n2cV4wlpn0afeaxLQG2PxxtcwDgYDVR0PAQH/BAQDAgEGMAoGCCqGSM49BAMDA2cA\nMGQCMFrZ+9DsJ1PW9hfNdBywZDsWDbWFp28it1d/5w2RPkRX3Bbn/UbDTNLx7Jr3\njAGGiQIwHFj+dJZYUJR786osByBelJYsVZd2GbHQu209b5RCmGQ21gpSAk9QZW4B\n1bWeT0vT\n-----END CERTIFICATE-----\n"
Instance Attribute Summary collapse
-
#certs ⇒ Object
Returns the value of attribute certs.
-
#x5c ⇒ Object
Returns the value of attribute x5c.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(x5c:) ⇒ Apple
constructor
A new instance of Apple.
- #verify!(authenticator_data, client_data_json) ⇒ Object
Constructor Details
#initialize(x5c:) ⇒ Apple
Returns a new instance of Apple.
24 25 26 27 28 29 |
# File 'lib/web_authn/attestation_statement/apple.rb', line 24 def initialize(x5c:) self.x5c = Array(x5c) self.certs = self.x5c.collect do |x5c| OpenSSL::X509::Certificate.new x5c end end |
Instance Attribute Details
#certs ⇒ Object
Returns the value of attribute certs.
22 23 24 |
# File 'lib/web_authn/attestation_statement/apple.rb', line 22 def certs @certs end |
#x5c ⇒ Object
Returns the value of attribute x5c.
22 23 24 |
# File 'lib/web_authn/attestation_statement/apple.rb', line 22 def x5c @x5c end |
Class Method Details
.decode(att_stmt) ⇒ Object
78 79 80 81 82 |
# File 'lib/web_authn/attestation_statement/apple.rb', line 78 def decode(att_stmt) new( x5c: att_stmt[:x5c] ) end |
Instance Method Details
#verify!(authenticator_data, client_data_json) ⇒ Object
31 32 33 34 |
# File 'lib/web_authn/attestation_statement/apple.rb', line 31 def verify!(authenticator_data, client_data_json) verify_nonce! authenticator_data, client_data_json verify_certificate! authenticator_data.attested_credential_data end |