By: Qin Rodney user 10 Feb 2017 at 1:43 a.m. CST

2 Responses
Qin Rodney gravatar
When register client into Gluu, it will return "oxd_id", but the "oxd_id" can become invalid as time passed, and throw "invalid_oxd_id" exception as following: **2017-02-09 09:49:47,486 DEBUG [org.xdi.oxd.server.service.SocketService] Start new SocketProcessor... 2017-02-09 09:49:47,488 TRACE [org.xdi.oxd.server.SocketProcessor] Socket processor handling... 2017-02-09 09:49:47,488 TRACE [org.xdi.oxd.common.CoreUtils] commandSize: -1, stringStorage: 2017-02-09 09:49:47,506 TRACE [org.xdi.oxd.common.CoreUtils] Parsed sizeString: 0126, commandSize: 126 2017-02-09 09:49:47,506 TRACE [org.xdi.oxd.common.CoreUtils] Read result: ReadResult{m_command='{"command":"get_authorization_url","params":{"prompt":null,"oxd_id":"6c1d897d-96a5-4536-9825-56317a6ef702","acr_values":null}}', m_leftString=''} 2017-02-09 09:49:47,506 TRACE [org.xdi.oxd.server.Processor] Command: {"command":"get_authorization_url","params":{"prompt":null,"oxd_id":"6c1d897d-96a5-4536-9825-56317a6ef702","acr_values":null}} 2017-02-09 09:49:47,507 ERROR [org.xdi.oxd.server.Processor] ErrorResponseException{errorResponseCode=ErrorResponseCode{value='invalid_oxd_id', description='Invalid oxd_id. Unable to find site for oxd_id. Please use register_site command for site registration.'}} at org.xdi.oxd.server.service.ValidationService.validate(ValidationService.java:50) at org.xdi.oxd.server.service.SiteConfigurationService.getSite(SiteConfigurationService.java:90) at org.xdi.oxd.server.op.BaseOperation.getSite(BaseOperation.java:103) at org.xdi.oxd.server.op.GetAuthorizationUrlOperation.execute(GetAuthorizationUrlOperation.java:35) at org.xdi.oxd.server.op.GetAuthorizationUrlOperation.execute(GetAuthorizationUrlOperation.java:20) 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) 2017-02-09 09:49:47,507 TRACE [org.xdi.oxd.server.Processor] Send back response: {"status":"error","data":{"error":"invalid_oxd_id","error_description":"Invalid oxd_id. Unable to find site for oxd_id. Please use register_site command for site registration."}} 2017-02-09 09:49:47,507 TRACE [org.xdi.oxd.server.SocketProcessor] Socket processor handling... 2017-02-09 09:49:47,507 TRACE [org.xdi.oxd.common.CoreUtils] commandSize: -1, stringStorage:** From Gluu oxd help doc(https://oxd.gluu.org/docs/protocol/ ), it sayed "Register site (called once--the first time your application uses oxd)". Seems we only need register site once and the oxd_id can be always used. Is there any configuration or additional steps need us do to ensure only register site once and the oxd_id will always valid.

By Mohib Zico Account Admin 10 Feb 2017 at 3:31 a.m. CST

Mohib Zico gravatar
Hi Qin, >> When register client into Gluu, it will return "oxd_id", but the "oxd_id" can become invalid as time passed There is a default timestamp of client secret value for all clients which are registered dynamically in Gluu Server. After registering your app in Gluu Server ( after completion of oxD registration ); try to change the 'Client Secret Expires' in associated client in Gluu Server. Let's see if that can resolve your issue.

By Qin Rodney user 13 Feb 2017 at 7:43 p.m. CST

Qin Rodney gravatar
We update the 'Client Secret Expires' before next related 'oxd_id' API call, and it works well. Thanks