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

feat: Issue 4 #8

Closed
wants to merge 21 commits into from
Closed

feat: Issue 4 #8

wants to merge 21 commits into from

Conversation

zg009
Copy link

@zg009 zg009 commented Nov 20, 2023

Describe your changes

Please include a summary of the change, a relevant motivation and context.
#4

Added:
-utils.go
-utils_test.go

Includes a HashEquals function which takes an input and output string and a possible user-determined crypto.Hash function (default is SHA256 according to DPoP standard) and determines equality.

Updated:
-errors.go
Utility error functions to make life easier for debugging and housekeeping

Code quality attempted to match library standard. If housekeeping is needed send back with clarifying statements

Issue ticket number and link

Attempt to fix #4 (Issue 4)

Checklist before requesting a review

  • I have performed a self-review of my own code
  • I have verified that the code builds perfectly fine on my local system
  • I have added tests that prove my fix is effective or that my feature works
  • I have commented my code, particularly in hard-to-understand areas
  • I have verified that my code follows the style already available in the repository
  • [?] I have made corresponding changes to the documentation

@zg009 zg009 changed the title Attempting to address Issue 4 fix: Issue 4 Nov 20, 2023
utils.go Outdated Show resolved Hide resolved
utils.go Outdated Show resolved Hide resolved
utils.go Outdated Show resolved Hide resolved
utils.go Outdated Show resolved Hide resolved
utils.go Outdated Show resolved Hide resolved
utils.go Outdated Show resolved Hide resolved
utils.go Show resolved Hide resolved
@a354dpa
Copy link
Contributor

a354dpa commented Nov 20, 2023

Thank you very much for your contribution!

This PR misses the mark a little bit. What we really need is to break out the actual hashing to a function that can be reused. The PR does this, but in the HashEquals method. It would be helpful if the hashing itself was to be its own method, with the equals function may still be there but make it call on the Hash-function.

Copy link
Member

@SalladinBalwer SalladinBalwer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great contribution, I still have a few comments that you can look at.

I would also like for you to change the PR title to feat: issue 4 as we use conventional commits and go-releaser to handle semantic versioning.

utils.go Outdated Show resolved Hide resolved
utils.go Outdated Show resolved Hide resolved
@zg009 zg009 changed the title fix: Issue 4 feat: Issue 4 Nov 21, 2023
Copy link
Member

@SalladinBalwer SalladinBalwer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is almost complete, I don't have access to a computer and can't check coverage.

Just make sure that coverage is complete and we'll look at merging this.

utils.go Outdated Show resolved Hide resolved
utils.go Outdated Show resolved Hide resolved
utils.go Outdated Show resolved Hide resolved
utils.go Show resolved Hide resolved
utils.go Show resolved Hide resolved
utils.go Show resolved Hide resolved
utils.go Show resolved Hide resolved
utils.go Show resolved Hide resolved
@zg009 zg009 closed this by deleting the head repository Nov 25, 2023
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.

[Request]: Helper function for hashing bound authorization token
3 participants