Update as_json to return string keys
This commit is contained in:
@@ -35,12 +35,14 @@ class ActionPack::WebAuthn::PublicKeyCredential::RequestOptions < ActionPack::We
|
||||
# Returns a Hash suitable for JSON serialization and passing to the
|
||||
# WebAuthn JavaScript API.
|
||||
def as_json(options = {})
|
||||
{
|
||||
json = {
|
||||
challenge: challenge,
|
||||
rpId: relying_party.id,
|
||||
allowCredentials: credentials.map { |credential| allow_credential_json(credential) },
|
||||
userVerification: user_verification.to_s
|
||||
}.as_json(options)
|
||||
}
|
||||
|
||||
json.as_json(options)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user