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

S2S token, S2S client, errors #7

Closed
wants to merge 3 commits into from
Closed

Conversation

david-littlefarmer
Copy link
Contributor

No description provided.

http.go Outdated Show resolved Hide resolved
http.go Outdated Show resolved Hide resolved
middleware_test.go Outdated Show resolved Hide resolved
Comment on lines +84 to 86
if cfg == nil {
return ""
}
Copy link
Contributor

Choose a reason for hiding this comment

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

return "" doesn't feel right

how about we make the cfg a non-pointer? and call it TokenClaims?

Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest (string, bool)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It panics, when it is nil
When the JWTSecret is empty, then it will return "" in the end.

I added validate function, which checks JWTSecret.
Best would be, if this function can return error.

@david-littlefarmer
Copy link
Contributor Author

Too many changes. Closing.

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.

3 participants