By: Marcus Munger user 15 Jun 2017 at 2:21 a.m. CDT

6 Responses
Marcus Munger gravatar
I am trying to get users to register themselves for my application by using Gluu. So what I have provided a link to <domain>/identity/register where they can sign up, and this works fine. However the problem is that after the registration they are redirected to the login page, that after authentication, directs the user to the Gluu "profile" page. If at all possible, I would like my users to be redirected to my webpage after registration. So, is this something that can be done?

By Mohib Zico staff 15 Jun 2017 at 5:10 a.m. CDT

Mohib Zico gravatar
Possible. You can add required declarations in 'User Registratoin' script. Also, if you are interested to look at source code, [here](https://github.com/GluuFederation/oxTrust/tree/master/server/src/main/java/org/gluu/oxtrust/action) are they.

By Marcus Munger user 15 Jun 2017 at 6:34 a.m. CDT

Marcus Munger gravatar
So I have looked through some of the source code, but I am having a hard time grasping exactly what I need to do in order to redirect it to wherever I want. But I assume that whatever it is that I need to do should be done in the postRegistration part of the user registration script?

By Mohib Zico staff 15 Jun 2017 at 7:35 a.m. CDT

Mohib Zico gravatar
Correct.

By Marcus Munger user 15 Jun 2017 at 10:07 a.m. CDT

Marcus Munger gravatar
Alright, I am completely lost on this... I cannot from the source code understand what parameters it is that I need to register. Is there any documentation available on this(besides the source code). Could you possibly provide a small example of how to direct the user to a static webpage?

By Marcus Munger user 16 Jun 2017 at 3:20 a.m. CDT

Marcus Munger gravatar
So this is where I am currently at... The postRegistration function takes in 4 parameters, self, user, requestParameters and configurationAttributes. self I assume is just a reference to itself and therefore it is not really valuable in this case as there are no set functions that redirects in that class and it does not seem to hold any valuable parameters. user is the user that is about to be registered and is sent down from org.gluu.oxtrust.action.RegisterPersonAction and is a org.gluu.oxtrust.model.GluuCustomPerson Object. I believe that this is my best bet at fixing this problem... although I am not sure about how. It does have a function setSourceServerName that seemed promising, but setting it did not change the outcome in any way. requestParameters is just the query parameters sent in the URL. I tried setting these to valid openid code authentication parameters, but it had no effect. configurationAttributes is simply the static parameters sent into the script from Gluu (just parameters set statically to the script) Moreover the function must return a boolean so I assume that what needs to be done is changing the input parameters as a side effect and thus my only two options are the user object and requestParameters. requestParameters seems to be just a private map object in the registerPersonAction class, which does not seem to do anything special with it, so changing this shouldn't have the outcome that I want. Therefore it must be the user object that I need to modify. However as previously stated, I do not yet know in what way

By Mohib Zico staff 16 Jun 2017 at 3:30 a.m. CDT

Mohib Zico gravatar
[Here](https://gluu.org/docs/ce/3.0.1/admin-guide/custom-script/) is the doc of interception script. I understand it's important to you but working on custom script is not covered in community support. You might be interested to take a look at [this](https://www.gluu.org/entitlements/).