I need dynamic parameters to be sent in the redirection that is made after the implicit grant token concession. Being dynamic, I can not configure the redirect URI that the OAuth requests.
The redirection web service that I created is a servlet in Java + HTML / JavaScript and it must be in this language.
In JavaScript I retrieve the hash of the token but I can not define the redirect servlet there to have access to previously defined global data in a previous servlet. I think that JavaScript does not allow to define the servlet, NodeJS does, but I can not use this language.
I tried:
- Oauth configuration: ...localhost:8080/Services/services/script/token
Request: .../oauth/authorize?client_id=XXXXXXXXXXXXXX&response_type=token&redirect_uri=http://localhost:8080/Services/services/script/token?conversationId=1234
Redirection response: https://login.mypurecloud.ie/#/error?errorKey=invalidRedirectUrl
- If I change ¿for ? , the token is generated and it redirects but we don't get the parameter.
Oauth configuration: ...localhost:8080/Services/services/script/token
Request: .../oauth/authorize?client_id=XXXXXXXXXXXX&response_type=token&redirect_uri=http://localhost:8080/Services/services/script/token?conversationId=1234
Redirection response: ...localhost:8080/Services/services/script/token#access_token=r9NVc4EmhoKO2uLAT4qCZa0UJZmtwlqT9F8OVSOF2OOViiqz9oPdvqDlIma09wyU01k2yHujkW6xJ0jm-diwhg&expires_in=86399&token_type=bearer
- If I change Oauth configuration to send the parameter, I must send it in a static way, what it doesn't suit my service, because the parameter will change with each interaction.
Thanks in advance.