0
votes

I'm trying to implement OAuth2 Authorization Code flow with WSO2 APIM 2.6 but I get a 405 method not allowed. Here is what I did

  1. Intall WSO2 APIM (no WOS2 IS nor IS-KM is in my environment. only APIM is present)
  2. Create a spring boot REST service with @Restcontroller. This leads to base path as http://localhost:8080
  3. Create an API in API publisher. This point to the REST service
  4. As admin create an application in API store and subscribe to the API. The call back URL is simply http://localhost:8080 as shown in the image below enter image description here

  5. Call the authorize method of WSO2 APIM with the following URL

https://localhost:9443/authorize?response_type=code&redirect_uri=http://localhost:8080&client_id=EaTfmmwQT4fWciN4WnU1YyyYYYsa

When I call this URL, I'm redirected to the login page of WSO2 APIM like below

enter image description here

I just log in with admin/admin

  1. Upon login, I though I'd be redirected to a authorize page, but instead I'm redirected to the following error page

enter image description here

Coul you guyz help me here ?

1

1 Answers

1
votes

You are trying with https://localhost:9443/authorize which is wrong. That is why it is redirecting to the carbon console. You can use one of the following URLs.

  1. https://localhost:9443/oauth2/authorize
  2. https://localhost:8243/authorize

This will prompt you to a different login page where you can use your login credentials.

https://docs.wso2.com/display/AM260/Authorization+Code+Grant