File: none.rb

package info (click to toggle)
ruby-webauthn 2.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 384 kB
  • sloc: ruby: 2,138; sh: 4; makefile: 4
file content (23 lines) | stat: -rw-r--r-- 469 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

require "webauthn/attestation_statement/base"

module WebAuthn
  module AttestationStatement
    class None < Base
      def valid?(*_args)
        if statement == {} && trustworthy?
          [WebAuthn::AttestationStatement::ATTESTATION_TYPE_NONE, nil]
        else
          false
        end
      end

      private

      def attestation_type
        WebAuthn::AttestationStatement::ATTESTATION_TYPE_NONE
      end
    end
  end
end