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 kid header #184

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

Conversation

kernle32dll
Copy link
Contributor

Continued from #160

@kernle32dll kernle32dll requested a review from g-w February 11, 2021 15:19
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 91.439% when pulling f288756 on kernle32dll:add-kid-header into eb0ac26 on tarent:master.

return token.SignedString(key)
}

func (h *Handler) GetToken(r *http.Request) (userInfo model.UserInfo, valid bool) {
func (h *Handler) GetToken(r *http.Request) (userInfo model.UserInfo, headers map[string]interface{}, valid bool) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't introduce return values for testing purposes.

True(t, valid)
Equal(t, input, userInfo)
}

func TestHandler_getToken_Key_ID(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The Name of the Test does not describe the tested feature. It should state that the kid value is stored in the jwt header if a token is generated.

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.

None yet

3 participants