By: Sakit Atakishiyev user 12 May 2017 at 8:07 a.m. CDT

13 Responses
Sakit Atakishiyev gravatar
Hello . I use beta version of Oxd server 3.1.0.When I register site , i get this error 2017-05-12 15:38:50,024 ERROR [org.xdi.oxd.server.Processor] org.jboss.resteasy.client.ClientResponse.getLocationLink()Lorg/jboss/resteasy/spi/Link; java.lang.NoSuchMethodError: org.jboss.resteasy.client.ClientResponse.getLocationLink()Lorg/jboss/resteasy/spi/Link; at org.xdi.oxauth.client.BaseResponse.<init>(BaseResponse.java:36) at org.xdi.oxauth.client.BaseResponseWithErrors.<init>(BaseResponseWithErrors.java:33) at org.xdi.oxauth.client.RegisterResponse.<init>(RegisterResponse.java:49) at org.xdi.oxauth.client.RegisterClient._exec(RegisterClient.java:237) at org.xdi.oxauth.client.RegisterClient.exec(RegisterClient.java:77) at org.xdi.oxd.server.op.RegisterSiteOperation.registerClient(RegisterSiteOperation.java:219) at org.xdi.oxd.server.op.RegisterSiteOperation.persistSiteConfiguration(RegisterSiteOperation.java:188) at org.xdi.oxd.server.op.RegisterSiteOperation.execute_(RegisterSiteOperation.java:58) at org.xdi.oxd.server.op.RegisterSiteOperation.execute(RegisterSiteOperation.java:71) at org.xdi.oxd.server.op.RegisterSiteOperation.execute(RegisterSiteOperation.java:37) at org.xdi.oxd.server.Processor.process(Processor.java:78) at org.xdi.oxd.server.Processor.process(Processor.java:53) 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) 2017-05-12 15:38:50,026 TRACE [org.xdi.oxd.server.Processor] Send back response: {"status":"error","data":{"error":"internal_error","error_description":"Unknown internal server error occurs."}} 2017-05-12 15:38:50,027 ERROR [org.xdi.oxd.server.SocketProcessor] Quit. Enable to process command.

By Jajati Badu Account Admin 12 May 2017 at 10:54 a.m. CDT

Jajati Badu gravatar
Hi Sakit, Have you checked version_3.1.0 not the Beta one? Please try 3.1.0 . If you are still facing issue please let me know Thanks, Jajati

By Jajati Badu Account Admin 14 May 2017 at 10:35 p.m. CDT

Jajati Badu gravatar
Hi Sakit, Just checking if the error is resolved now by using OXD Server 3.1.0 Thanks, Jajati

By Sakit Atakishiyev user 15 May 2017 at 1:34 a.m. CDT

Sakit Atakishiyev gravatar
Hi. I used this version(oxd-server-3.1.0-SNAPSHOT). But again i got the same error.

By Jajati Badu Account Admin 15 May 2017 at 1:39 a.m. CDT

Jajati Badu gravatar
[oxd-server-3.1.0-SNAPSHOT](http://ox.gluu.org/maven/org/xdi/oxd-server/3.1.0-SNAPSHOT/oxd-server-3.1.0-SNAPSHOT-distribution.zip) Also could you please provide the Redirect Url you are trying for Register the Site? Please make sure you are not trying a localhost url. The Redirect url must be a hostname with https . Ex https://client.example.com Thanks, Jajati

By Sakit Atakishiyev user 15 May 2017 at 1:57 a.m. CDT

Sakit Atakishiyev gravatar
Ou yeah. I know that . I use my domain as redirect uri (https://client.sakit.com)

By Jajati Badu Account Admin 15 May 2017 at 2:13 a.m. CDT

Jajati Badu gravatar
Ok. Could you please share the code block where you the Client registration code is implemented. You can check this document also if your client application is on Java https://gluu.org/docs/oxd/libraries/java/

By Sakit Atakishiyev user 15 May 2017 at 2:17 a.m. CDT

Sakit Atakishiyev gravatar
Here you are . RegisterSiteResponse result = null; try { CommandClient client = new CommandClient("127.0.0.1", 8099); final RegisterSiteParams commandParams = new RegisterSiteParams(); commandParams.setOpHost("https://client.gluu.info"); commandParams.setAuthorizationRedirectUri("https://client.oxd.info:8443/GluuServerTest/user/profile"); // commandParams.setPostLogoutRedirectUri(postLogoutRedirectUrl); // commandParams.setClientLogoutUri(Lists.newArrayList(logoutUri)); commandParams.setScope(Lists.newArrayList("openid","uma_protection","uma_authorization", "email", "clientinfo", "profile", "permission")); Command command = new Command(CommandType.REGISTER_SITE); command.setParamsObject(commandParams); result = client.send(command).dataAsResponse(RegisterSiteResponse.class); } catch (Exception ex) { System.err.println(ex.getMessage()); } I know docs. I have used this code in previous version of oxd and there was no problem.

By Sakit Atakishiyev user 15 May 2017 at 2:51 a.m. CDT

Sakit Atakishiyev gravatar
Woww , it worked. I used oxd that you sent. But now i get another error . After registering i get oxd_id . it is ok. But oxd server does not create json file(client info). Besides What is that protectionAccessToken ? How can i get it ? 2017-05-15 11:07:30,612 TRACE [org.xdi.oxd.common.CoreUtils] Read result: ReadResult{m_command='{"command":"get_authorization_url","params":{"prompt":null,"scope":["openid","email","clientinfo"],"oxd_id":"5e6a5ce0-938a-45c0-9f48-f87709e470c5","acr_values":null,"hd":null,"protection_access_token":null}}', m_leftString=''} 2017-05-15 11:07:30,612 TRACE [org.xdi.oxd.server.Processor] Command: {"command":"get_authorization_url","params":{"prompt":null,"scope":["openid","email","clientinfo"],"oxd_id":"5e6a5ce0-938a-45c0-9f48-f87709e470c5","acr_values":null,"hd":null,"protection_access_token":null}} 2017-05-15 11:07:30,613 ERROR [org.xdi.oxd.server.Processor] ErrorResponseException{errorResponseCode=ErrorResponseCode{value='blank_protection_access_token', description='protection_access_token is blank. Command is protected by protection_access_token, please provide valid token or otherwise switch off protection in configuration with protect_commands_with_access_token=false'}} at org.xdi.oxd.server.service.ValidationService.validate(ValidationService.java:65) at org.xdi.oxd.server.service.ValidationService.validate(ValidationService.java:51) at org.xdi.oxd.server.Processor.process(Processor.java:76) at org.xdi.oxd.server.Processor.process(Processor.java:53) 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) 2017-05-15 11:07:30,614 TRACE [org.xdi.oxd.server.Processor] Send back response: {"status":"error","data":{"error":"blank_protection_access_token","error_description":"protection_access_token is blank. Command is protected by protection_access_token, please provide valid token or otherwise switch off protection in configuration with protect_commands_with_access_token=false"}} 2017-05-15 11:07:30,614 TRACE [org.xdi.oxd.server.SocketProcessor] Socket processor handling... 2017-05-15 11:07:30,614 TRACE [org.xdi.oxd.common.CoreUtils] commandSize: -1, stringStorage:

By Sakit Atakishiyev user 16 May 2017 at 12:06 a.m. CDT

Sakit Atakishiyev gravatar
Hi. I am wainting for your answer :)

By Jajati Badu Account Admin 16 May 2017 at 12:43 a.m. CDT

Jajati Badu gravatar
Hi Sakit, If you are using oxd server 3.1 + you need to send access token with each request. This is for added security. However if you don't need this you can turn off this feature by changing "protect_commands_with_access_token": false in the configuration file. Please check the below url https://github.com/GluuFederation/oxd/issues/75#issuecomment-301459327 Thanks Jajati

By Sakit Atakishiyev user 16 May 2017 at 1:02 a.m. CDT

Sakit Atakishiyev gravatar
Ok I will do it. But I don't understand the exact reason why you added this feature? And I just try to get authenticate url. why do I need any access token? And how can I get access token if I don't authenticate my user?

By Jajati Badu Account Admin 16 May 2017 at 4:32 a.m. CDT

Jajati Badu gravatar
Hi Sakit, This is an optional feature for oxd server and mandatory feature for upcoming OXD Web. If you are only using oxd-server then you can turn off this by changing "protect_commands_with_access_token": false in config file. If you use setup_client command instead of register_site command then as a response you will get client_registration_access_token. NOTE: This command will work when "client_registration_access_token": is not set to false in config file Thanks, Jajati

By Sakit Atakishiyev user 22 May 2017 at 12:16 a.m. CDT

Sakit Atakishiyev gravatar
I got it . I corrected that and it worked. Thanks.