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

Fix JS syntax issues #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

bmontuelle
Copy link

Good morning/afternoon

While trying to implement OAuth2 token introspection using Nginx Plus, I had to change a few lines in the oauth2.js script to get it to work.

There is no length property on javascript primitive type boolean, it returns undefined everytime and never enter the bloc

if (response.active.length) {

In here, response is the object representation of the introspection response. Encoding it in base64 will in fact encode [Object object] I encoded the responseBody bytes instead

response.toString('base64')

From what I was able to test caching works fine and no issue with decoding the introspection being from server response or cached value.

Cheers,
Benoit

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.

1 participant