By: veera Bv user 03 Jan 2019 at 8:45 a.m. CST

4 Responses
veera Bv gravatar
Hi Team, Am new to Gluu we instatalled version 3.1.4 in local server contains CentOS7. Requirement to Authentication API for login API URL used to generate Access token get call throwing error 404 ``` https://192.168.1.212/oxauth/seam/resource/restv1/oxauth/authorize?scope=openid&response_type=token id_token&client_id=@!EAEA.726C.E743.4581!0001!4DA4.EFB3!0008!E228.5EDB.1B96.99E8&redirect_uri=https://192.168.1.212/Dashboard/index.php ``` Please assist me which is the right url to generate access-token. ``` 1.https://192.168.1.212/oxauth/seam/resource/restv1/oxauth/authorize 2. https://192.168.1.212/oxauth/seam/resource/restv1/oxauth/token ``` Referred link : ``` 1.https://gluu.org/docs/ce/api-guide/openid-connect-api/ ``` Request ``` https://192.168.1.212/oxauth/seam/resource/restv1/oxauth/authorize?scope=openid&response_type=code&client_id=@!EAEA.726C.E743.4581!0001!4DA4.EFB3!0008!E228.5EDB.1B96.99E8&scope=openid&redirect_uri=https%3A%2F%2F192.168.1.31%2FDashboard%2Findex.php&response_type=token id_token ``` Response: ``` <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <title>Error 404 Not Found</title> </head> <body> <h2>HTTP ERROR 404</h2> <p>Problem accessing /oxauth/seam/resource/restv1/oxauth/authorize. Reason: <pre> Not Found</pre> </p> <hr> <a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.12.v20180830</a> <hr/> </body> </html> ``` I dint find right example doc to achieve am using PHP code. Thanks, Veera

By Michael Schwartz Account Admin 03 Jan 2019 at 1:21 p.m. CST

Michael Schwartz gravatar
What flow (grant type) are you using? You are calling the authorization endpoint, but you are not requesting response_type code. If you plan to write your own code to implement an OpenID Connect client, you should review the [Basic Implementer's Guide](https://openid.net/specs/openid-connect-basic-1_0.html)

By Aliaksandr Samuseu staff 03 Jan 2019 at 2:03 p.m. CST

Aliaksandr Samuseu gravatar
Hi, Veera. First, I must mention we don't usually assist users trying to implement their own OIDC clients, as explained [here](https://www.gluu.org/blog/limiting-openid-connect-community-client-support/). So if you would like to still have some level of support as a free user, you should try to stick to one of the client implementations mentioned there, of which Apache's mod_auth_openidc seems like the most straightforward free option. You could also consider buying a license for our own oxd server package, which comes with [PHP libraries](https://gluu.org/docs/oxd/3.1.4/libraries/languages/php/) that should allow you to integrate it into your app. Regarding endpoints' location, you should always consult OP's metadata, which is at `https://your.gluu.dns.name/.well-known/openid-configuration` But without understanding which role each of them plays, it won't help much, so take Michael's advice and study the specs document to understand the sequence and composition of requests and responses your app will be dealing with. Again, we can't help much here, within the scope of Community Support.

By Michael Schwartz Account Admin 03 Jan 2019 at 2:06 p.m. CST

Michael Schwartz gravatar
+1 on not writing your own client code. You should check out our oxd middleware: https://oxd.gluu.org We have a php library for oxd that provides a high level interface for all the OpenID Connect methods.

By veera Bv user 04 Jan 2019 at 12:25 a.m. CST

veera Bv gravatar
Hi Michael/Aliaksandr Samuseu Thanks for quick response i will go through links shared. Regards, Veera