By: Jajati Badu Account Admin 04 Apr 2017 at 2:59 a.m. CDT

6 Responses
Jajati Badu gravatar
Downloaded the C# version of Ox client library and MVC application. When I run the MVC application I am getting the attached Screen. Where it asks for - OXD Host IP address - OXD Port - Redirect URL When I enter the values (as mentioned in Screenshot) I get message "Registration successful" But in oxd-server log file I found below entry. Could you please suggest what will be the valid redirect url ? > > 2017-04-04 10:02:11,854 INFO [org.xdi.oxd.server.op.RegisterSiteOperation] Creating site configuration ... > 2017-04-04 10:02:11,858 TRACE [org.xdi.oxd.server.service.HttpService] Created TRUST_ALL client. > 2017-04-04 10:02:13,292 ERROR [org.xdi.oxd.server.op.RegisterSiteOperation] ClientId: null, clientSecret: null > 2017-04-04 10:02:13,294 ERROR [org.xdi.oxd.server.op.RegisterSiteOperation] Value of one or more redirect_uris is invalid. > 2017-04-04 10:02:13,294 ERROR [org.xdi.oxd.server.op.RegisterSiteOperation] Failed to register client for site. Details:{"error":"invalid_redirect_uri","error_description":"Value of one or more redirect_uris is invalid."} > java.lang.RuntimeException: Failed to register client for site. Details:{"error":"invalid_redirect_uri","error_description":"Value of one or more redirect_uris is invalid."} > at org.xdi.oxd.server.op.RegisterSiteOperation.registerClient(RegisterSiteOperation.java:230) > at org.xdi.oxd.server.op.RegisterSiteOperation.persistSiteConfiguration(RegisterSiteOperation.java:184) > at org.xdi.oxd.server.op.RegisterSiteOperation.execute(RegisterSiteOperation.java:60) > at org.xdi.oxd.server.op.RegisterSiteOperation.execute(RegisterSiteOperation.java:37) > at org.xdi.oxd.server.Processor.process(Processor.java:80) > at org.xdi.oxd.server.Processor.process(Processor.java:55) > at org.xdi.oxd.server.SocketProcessor.run(SocketProcessor.java:60) > at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) > at java.lang.Thread.run(Unknown Source) Please let me know if you need any information

By Mohib Zico staff 04 Apr 2017 at 3:44 a.m. CDT

Mohib Zico gravatar
I haven't checked C# library yet but couple of points according to the [doc](https://gluu.org/docs/oxd/2.4.4/libraries/csharp/): - _Application will not be working if your host does not have https://._ Are you sure that you can use localhost and/or 127.0.0.1 for redirect_uri plus OP_host ?

By Jajati Badu Account Admin 04 Apr 2017 at 4:29 a.m. CDT

Jajati Badu gravatar
Thanks for the quick reply. Gluu server url is https://gluu.centroxy.com/ When I run application (ASP.Net) from my local the url is https://localhost:44367/ Regarding the redirect_uri I am not sure if it will be localhost or 127.0.0.1. It would be great if you can tell me what should be a valid redirect uri

By Mohib Zico staff 04 Apr 2017 at 8:09 a.m. CDT

Mohib Zico gravatar
Ok. Will ask developer to response.

By Michael Schwartz Account Admin 04 Apr 2017 at 1:55 p.m. CDT

Michael Schwartz gravatar
I think this is a bug. `http` should be allowed for `localhost` redirect_uri. I opened an issue: [https://github.com/GluuFederation/oxAuth/issues/496](https://github.com/GluuFederation/oxAuth/issues/496) However, for testing, you should not use localhost. .Net is a web application, and can use HTTPS in IIS. Just make sure you update your local hosts files too.

By Jajati Badu Account Admin 04 Apr 2017 at 2:20 p.m. CDT

Jajati Badu gravatar
Thanks a lot Mike. As another workaround I changed \.vs\configapplicationhost.config file like below and changed the host file. Now when I run the application in Visual Studio the url looks like https://client.example.com:44367/ and easy to debug > <bindings> > <binding protocol="http" bindingInformation="*:1329:client.example.com" /> > <binding protocol="https" bindingInformation="*:44367:client.example.com" /> > </bindings>

By Michael Schwartz Account Admin 04 Apr 2017 at 2:26 p.m. CDT

Michael Schwartz gravatar
Can we close this issue?