Expose token verification method in public API
See original GitHub issueI use express-jwt
with most of projects. Its awesome.
Would it be possible / acceptable to expose token verification method to public API. This process is sometime required to arbitrarily check if a request has valid session or not.
Use case
All request passed by unless
are ignored by express-jwt
, I think that is good. But even these requests have session attached ( Authorization
header set) sometime. There is no way to tell what user this request have. If express-jwt
expose token verification process it can be done easily. Otherwise I’ll have to rewrite (copy) same logic which will extract token from headers and check if session is valid.
I’ll be able to help with a PR if this suggestion is accepted.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Token Based Authentication Made Easy - Auth0
Token based authentication works by ensuring that each request to a server is accompanied by a signed token which the server verifies for...
Read more >How to expose my API in a secure way - Nubentos
In this article, we introduce the main authentication and authorization methods that we can use to secure a REST API, and we will...
Read more >5 fundamental strategies for REST API authentication
There are various authentication methods for REST APIs, ranging from basic credentials and token encryption to complex, multilayered access ...
Read more >Best practices for REST API security: Authentication and ...
This process of defining access policies for your app is called authorization. In this article, we'll show you our best practices for ...
Read more >API Expose, Consume & add Authentication using Bearer Token
Here am Generating JWT Token in OnBeforeRequest Action which is in Consume API and Assign to HTTP Header and Also assign it too...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jfromaniello I will think about the API and will post soon
@laxman-spidey I don’t remember, neither I have access to source code anymore, but if I have to guess I must have copied this method as there is no API exposed