Skip to content

Conversation

nivmeshorer
Copy link
Contributor

Support constructing JwtAuthenticator with token includes Bearer prefix

Description

This pull request have made to handle scenario of constructing the JwtAuthenticator with token string which includes the Bearer Prefix. For example, Sending http request from one web service to another which use the same jwt secret. In this scenario it is likable to use the Authorization header value from the original request (to the first service). This value includes the Bearer prefix.

Current Behavior: When Passing the value of the existing Authorization attribute to the JwtAuthenticator constructor the result value of the Authorization attribute of the new request will be "Bearer Bearer "

Expected Behavior: The Authorization header value of the new request will be "Bearer "

Purpose

This pull request is a:

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@dnfadmin
Copy link

dnfadmin commented Oct 26, 2022

CLA assistant check
All CLA requirements met.

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.

4 participants