How to mock keycloak login? #1731
-
How do I mock keycloak login? |
Beta Was this translation helpful? Give feedback.
Answered by
kettanaito
Sep 8, 2023
Replies: 1 comment
-
Hi, @etosdan. MSW is designed to intercept HTTP requests. If you use the REST API for Keycloak, you will be able to intercept any HTTP requests your application makes and mock their responses to be what Keycloak would send in case of a successful/unsuccessful authorization. Look up how to use that service via a REST API, and then follow the Mocking REST API step of our tutorial to translate that API into request handlers. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
kettanaito
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, @etosdan.
MSW is designed to intercept HTTP requests. If you use the REST API for Keycloak, you will be able to intercept any HTTP requests your application makes and mock their responses to be what Keycloak would send in case of a successful/unsuccessful authorization. Look up how to use that service via a REST API, and then follow the Mocking REST API step of our tutorial to translate that API into request handlers.