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

Testing JWT endpoint with RESTassured #293

Open
appiepollo14 opened this issue Jun 22, 2023 · 1 comment · May be fixed by #426
Open

Testing JWT endpoint with RESTassured #293

appiepollo14 opened this issue Jun 22, 2023 · 1 comment · May be fixed by #426
Assignees
Labels
is:enhancement New feature or request
Milestone

Comments

@appiepollo14
Copy link
Collaborator

When following the guide on testing a JWT endpoint, there is a provided solution for injecting a JWT when using the Microshed RESTClient. However, I'm fond of using REST Assured. I was frustrated to find out, that the @JwtConfig is not applicable to the REST Assured client.

In a testclass annotated with @MicroShedTest, I would like to apply the @JwtConfig annotation or a similar annotation, on the testmethod to apply the same logic as when applied to annotating the Microshed RESTClient with it. When annotation the methods, It should not matter what client being used, whether it is REST Assured or the Microshed RESTClient, the logic of generate and configure a pair of JWT secrets for the ApplicationContainer container, should be executed in order to test endpoints secured with a JWT without a hassle.

An alternative would be updating the documentation and mention two possibilities:

  1. Provide a JWT in the header of the request
  2. Configure the RestAssured.authentication property within the test
@appiepollo14 appiepollo14 added the is:enhancement New feature or request label Jun 22, 2023
@KyleAure KyleAure added this to the 0.9.3 milestone Dec 13, 2023
@appiepollo14 appiepollo14 self-assigned this Dec 28, 2023
@appiepollo14
Copy link
Collaborator Author

Started working on this issue!

appiepollo14 added a commit to appiepollo14/microshed-testing that referenced this issue Dec 29, 2023
Signed-off-by: asjervanasten <[email protected]>
@appiepollo14 appiepollo14 linked a pull request Dec 29, 2023 that will close this issue
appiepollo14 added a commit to appiepollo14/microshed-testing that referenced this issue Dec 29, 2023
Signed-off-by: asjervanasten <[email protected]>
appiepollo14 added a commit to appiepollo14/microshed-testing that referenced this issue Jan 3, 2024
Signed-off-by: asjervanasten <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants