Skip to content

fix Ed25519 parameter value to EdDSA #4

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

Merged
merged 2 commits into from
Sep 13, 2023
Merged

Conversation

jonsch318
Copy link
Contributor

Very small fix. The alg parameter value is not Ed25519 but EdDSA as it should be. The library does this correctly but the docs said Ed25519.

func (m *SigningMethodEd25519) Alg() string {
	return "EdDSA"
}

Copy link
Collaborator

@oxisto oxisto left a comment

Choose a reason for hiding this comment

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

Good catch

If you have trouble handling a `[]byte` key in our setup, e.g., because you are reading it from your environment variables on your cluster or similar, you can always use base64 encoding to have the key as a "string" type outside of your program and then use [`base64.Encoding.DecodeString`](https://pkg.go.dev/encoding/base64#Encoding.DecodeString) to decode the base64 string into the `[]byte` slice that the signing method needs.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I can't figure out what you changed here. Is it a "bad" whitespace?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

honestly i dont know either. I was editing with the github website because i was lazy.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Aaah the newline

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh damm thanks

@oxisto oxisto merged commit 5994abc into golang-jwt:main Sep 13, 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.

2 participants