Same computer is not enough – they have to be hosted on the same server and the 
same port (i.e., the same application/service). 

Only browsers are affected by CORS, which is why curl works as expected. Try 
fixing that first, then we can check for other issues.

 

 

From: <[email protected]> on behalf of Néstor Almeida 
<[email protected]>
Reply-To: "[email protected]" 
<[email protected]>
Date: Tuesday, October 3, 2017 at 05:26
To: Swagger <[email protected]>
Subject: Re: Keycloak (OpenID-Connect OAuth) Swagger Integration

 

Client and server is in the same computer. This does not seem to be a CORS 
mistake. If I launch curl it works. 

 

curl -d "client_id=gcid-alertas-restful-api" -d "client_secret=

client-secret" -d "username=usuario1" -d "password=password" -d "grant_type=pass

word" http://IPADDRESS:18080/auth/realms/gcid/protocol/openid-connect/token

 

But Swagger omit parameters like grant_type, user and password to get the 
token. 

 

Here is the generated link in the Swagger "Authorize" button:

 

http://IPADDRESS:18080/auth/realms/gcid/protocol/openid-connect/token?client_id=gcid-alertas-restful-api&client_secret=client-secret.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to