Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lambdas vs Interface for integration points #12

Closed
abergs opened this issue Aug 13, 2018 · 1 comment
Closed

Lambdas vs Interface for integration points #12

abergs opened this issue Aug 13, 2018 · 1 comment

Comments

@abergs
Copy link
Collaborator

abergs commented Aug 13, 2018

The library depends on multiple integrations with the RP app.
The RP-app is responsible for:

  • Validating that the credentialId is unique to the user (today: isCredentialIdUniqueToUserDelegate with params: byte[], user)
  • Validating that the UserHandle owns the CredentialId (today: isUserHandleOwnerOfCredentialId)
  • Increasing the stored Counter
  • Storing the Public Key + CredentialId returned by the MakeCredential operations

... basically anything that needs storage.

Should the API be based on multiple Func/namedFuncs callbacks or take a implementation of an interface.

I believe an interface will be easier for a user to understand and maintain while the lambdas feel more lightweight, however don't outweigh the maintainability of a interface.

@abergs
Copy link
Collaborator Author

abergs commented Aug 17, 2018

Decided to go for lambdas with typed parameter class, best middleground.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant