Method: TwoFactorAuth::AuthenticationRequest#serialized

Defined in:
app/models/two_factor_auth/authentication_request.rb

#serializedObject

this matches te browser’s u2f api



21
22
23
24
25
26
27
28
# File 'app/models/two_factor_auth/authentication_request.rb', line 21

def serialized
  {
    appId: app_id,
    keyHandle: TwoFactorAuth.websafe_base64_encode(key_handle),
    challenge: challenge,
    version: U2F_VERSION,
  }.to_json
end