question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Authenticator persistance

See original GitHub issue

Hi,

in the readme of webauthn4j, you wrote something like

save(authenticator); // please persist authenticator in your manner
Authenticator authenticator = load(credentialId); // please load authenticator object persisted in the registration process in your manner

I’m fine with that, but I failed to find a way to serialize and deserialize Authenticator instances. I tried several ways, using Jackson, converters, etc, but while serialization works, deserialization does not work 😕

All the following examples fails :

val bytes = new CborConverter().writeValueAsBytes(authenticator)
println(bytes)
val auth = new CborConverter().readValue(bytes, classOf[Authenticator])
println(auth)

or

val json = new JsonConverter().writeValueAsString(authenticator)
println(json)
val auth = new JsonConverter().readValue(json, classOf[Authenticator])
println(auth)

or

val module = new com.webauthn4j.converter.jackson.WebAuthnJSONModule(new JsonConverter(), new CborConverter())
val mapper = new ObjectMapper().registerModules(module)
val json = mapper.writeValueAsString(authenticator)
println(json)
val auth =  mapper.readValue(json, classOf[Authenticator])
println(auth)

can you explain what i’m doing wrong ?

Thanks

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ynojimacommented, Jun 6, 2022

credentialId is less than 1024 bytes. attestedCredentialData is normally less than 1024 bytes attestationStatement has no size limit, but normally less than 16384 bytes. client extensions JSON size has no size limit. authenticator extensions also has no size limit.

0reactions
sergeev1chvncommented, Jun 6, 2022

@ynojima thx, enough 30_000 varchar

Read more comments on GitHub >

github_iconTop Results From Across the Web

Authentication State Persistence | Firebase - Google
You can choose one of three types of Auth state persistence on a specified Firebase Auth instance based on your application or user's...
Read more >
Persistent and 2-Factor Authentication
Persistent Authentication refers to the ability of the EMS Mobile App to automatically log users in so that they are not required to...
Read more >
Configure authentication session management - Microsoft Entra
Customize Azure AD authentication session configuration including user sign-in frequency and browser session persistence.
Read more >
Persisting Authentication :: Spring Security
Persisting Authentication · The user submits their username and password. · Upon authenticating the user, the user is associated to a new session...
Read more >
MFA Google Authenticator persistence issue?
I am trying to setup Google Authenticator for MFA purposes. It works fine in memory mode. So now we want to install persistence...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found