debian-mirror-gitlab/app/models/webauthn_registration.rb

12 lines
363 B
Ruby
Raw Normal View History

2020-07-28 23:09:34 +05:30
# frozen_string_literal: true
# Registration information for WebAuthn credentials
class WebauthnRegistration < ApplicationRecord
belongs_to :user
validates :credential_xid, :public_key, :name, :counter, presence: true
validates :counter,
numericality: { only_integer: true, greater_than_or_equal_to: 0, less_than_or_equal_to: 2**32 - 1 }
end