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

Handle Partial JWT Tokens #1032

Open
x2764tech opened this issue Jan 24, 2024 · 2 comments
Open

Handle Partial JWT Tokens #1032

x2764tech opened this issue Jan 24, 2024 · 2 comments
Labels
enhancement Idea of improvement of existing feature. under consideration We like the idea / feedback but don't commit to it yet.

Comments

@x2764tech
Copy link

x2764tech commented Jan 24, 2024

What improvement do you think would an existing feature or tool in DevToys?

In some cases, my tooling records JWT tokens without the signature part.

Some other tools (1, 2) handle this with a warning, and it would be nice if DevToys could do the same

Solution/Idea

The current implementation uses JwtSecurityTokenHandler, which requires the token have 2 or 3 dots.

It would require writing a parser to handle partial tokens.

Comments

You can easily recreate this by stripping the last part of the token (from the last period onward).

Here's one from our dev environment that I've been struggling with:

eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJBblBQLWQta2MzTS1RMno3T2FjbUNIaHBnYUVmWW1SbnRtTFkxVmF0QUlFIn0.eyJqdGkiOiJmOGMxNjU2YS02OWM2LTRjMWYtYjQzNC02OGEzODBlYThmZmIiLCJleHAiOjE3MDYwODgxMzEsIm5iZiI6MCwiaWF0IjoxNzA2MDg4MDcxLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjI4MDgwL2F1dGgvcmVhbG1zL2VsYWIiLCJhdWQiOiJhaXJsb2NrLXVpIiwic3ViIjoiZWMyMWRiYzEtYzg3NC00NzU0LWJjODAtZjUxY2ZiNWZkYTgwIiwidHlwIjoiSUQiLCJhenAiOiJhaXJsb2NrLXVpIiwibm9uY2UiOiI2Mzg0MTY4NDg2MzUwODc3MzAuTXpjeE9EazNZek10TjJJd015MDBOMkU1TFRsaU5qUXRNREZqTkdKaU0ySTBNakkyTldSa01tTTBNakF0TjJOaU9TMDBZVFV3TFRnME5qVXRZak15WWpkaVpHRTJOamRtIiwiYXV0aF90aW1lIjoxNzA2MDg4MDcwLCJzZXNzaW9uX3N0YXRlIjoiNjYwOGY1MGMtM2I0ZS00MWRhLTlkMmItNmNkYjI3NGM3ZjkzIiwiYWNyIjoiMSIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwicm9sZXMiOlsiYW5hbHlzdCJdLCJuYW1lIjoiVGhlIEFuYWx5c3QiLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJhbmFseXN0IiwiZ2l2ZW5fbmFtZSI6IlRoZSIsImZhbWlseV9uYW1lIjoiQW5hbHlzdCIsImVtYWlsIjoiYW5hbHlzdEB4Mjc2NXRlLmNoIn0
@x2764tech x2764tech added enhancement Idea of improvement of existing feature. untriaged labels Jan 24, 2024
@veler
Copy link
Collaborator

veler commented Mar 20, 2024

Hi, thanks for sharing this feedback,
@btiteux , do you think this is something that is common enough that we would want to support in DevToys? Probably not in the initial 2.0 release but later.

@veler veler added under consideration We like the idea / feedback but don't commit to it yet. and removed untriaged labels Apr 7, 2024
@veler
Copy link
Collaborator

veler commented Apr 7, 2024

Sounds tricky to implement. Let's wait to see if people upvote this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Idea of improvement of existing feature. under consideration We like the idea / feedback but don't commit to it yet.
Projects
None yet
Development

No branches or pull requests

2 participants