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

Consider implement jwt.Cliams for the structure in path appstore #238

Open
leeshun opened this issue Sep 23, 2023 · 1 comment
Open

Consider implement jwt.Cliams for the structure in path appstore #238

leeshun opened this issue Sep 23, 2023 · 1 comment

Comments

@leeshun
Copy link

leeshun commented Sep 23, 2023

I see the struct in the path appstore/api have implement jwt.Claims, and these struct can just call jwt.ParseWithClaims. But the struct in the path appstore can only use jwt.Parse and we should write so many convert code to get data, such as

        token := jwt.Token{}
	if err := client.ParseNotificationV2(tokenStr, &token); err != nil {
		t.Errorf("expected an error to be nil since the tokenStr is legal")
	}
	claims, ok := token.Claims.(jwt.MapClaims)
	if !ok {
		t.Errorf("claim should be jwt.MapClaims")
	}
@richzw
Copy link
Collaborator

richzw commented Sep 26, 2023

@leeshun , the ParseNotificationV2WithClaim had been added. Please let me know if there is anything more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants