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

MockServer as an OAuth2/OpenID Connect Resource Server #1794

Open
xuanswe opened this issue Sep 11, 2023 · 0 comments
Open

MockServer as an OAuth2/OpenID Connect Resource Server #1794

xuanswe opened this issue Sep 11, 2023 · 0 comments

Comments

@xuanswe
Copy link

xuanswe commented Sep 11, 2023

I ask my question here because

  • The link to Slack channel doesn't work
  • GitHub discussion tab is disabled

I would like to implement an integration test as follow

image

WebTestClient must get JWT token from resource server and attach the token when calling Rest API of the Spring Boot Application. Spring Boot Application verifies the received JWT token via the resource server. I don't want to change any security configuration of the Spring Boot Application. The only change I want is to point to a mock resource server.

I am using MockServer for the blue block ${\color{#1971c2}1st Embedded Mock Server - HTTP REST API}$. Everything works fine.

Now, I would like to start another MockServer instance for the red block ${\color{#e03131}2nd Embedded Mock Server - OAuth2/OpenID Connect - Resource Server}$.

I found https://github.com/navikt/mock-oauth2-server, but it doesn't use MockServer behind.
Is there a way to use MockServer for the same purpose?

@xuanswe xuanswe changed the title MockServer as a OAuth2/OpenID Connect Resource Server MockServer as an OAuth2/OpenID Connect Resource Server Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant