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

add go.mod, allow overriding rand.Reader and time.Now #20

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

egonk
Copy link

@egonk egonk commented Aug 17, 2021

add go.mod

A basic go.mod file with go 1.14 requirement (N-3 at the moment). It could be older or newer if you wish.

allow overriding rand.Reader and time.Now and make Registration.Authenticate and NewChallenge backward compatible

We run u2f in a special environment with a custom time provider, so it's a must for us. rand.Reader override makes tests a bit cleaner IMO. First commit adds Config in a clean but incompatible way. Second commit makes the changes backward compatible. I based the changes on #13 (comment)

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

Successfully merging this pull request may close these issues.

1 participant