question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expose token verification method in public API

See original GitHub issue

I 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:open
  • Created 7 years ago
  • Reactions:3
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
sushantdhimancommented, Oct 4, 2016

@jfromaniello I will think about the API and will post soon

0reactions
sushantdhimancommented, Sep 17, 2018

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found