6c58fd9bdd
- Create Identity credentials - Add management UI and registration flow
14 lines
317 B
Ruby
14 lines
317 B
Ruby
class Identity::Credential < ApplicationRecord
|
|
belongs_to :identity
|
|
|
|
serialize :transports, coder: JSON, type: Array, default: []
|
|
|
|
def to_public_key_credential
|
|
ActionPack::WebAuthn::PublicKeyCredential.new(
|
|
id: credential_id,
|
|
public_key: public_key,
|
|
transports: transports
|
|
)
|
|
end
|
|
end
|