Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

We used the following files and folders inside of customer's selfservice-ext.war file:
1.    selfservice-ext.war/WEB-INF/selfservice-ext-servlet.xml
2.    selfservice-ext.war/WEB-INF/flows/pub/accountClaim.xml
3.    selfservice-ext.war/WEB-INF/groovy/EmployeeService.groovy
4.    selfservice-ext.war/WEB-INF/jsp/pub/


File/FolderDescription
accountClaim.xmlIt is a Spring webflow config file itself. It includes steps, views and order of steps that comprises a flow. Example of such file can be found in our default selfservice-ext.war installation module (see selfservice-ext.war/WEB-INF/flows/pub/accountClaim.xml). Full docs can be found on the Spring.IO website http://docs.spring.io/spring-webflow/docs/2.3.4.RELEASE/reference/html.
UserService.groovyIt is a Groovy class that includes all functions and logic needed to implement customer's Account Claim process. An example of such Groovy class can be found at selfservice-ext.war/WEB-INF/groovy/ EmployeeService.groovy in our default installation. Here we make validations, call OpenIAM services, save user, etc. Everything that can be implemented in OpenIAM can be written in this Groovy file without need to rebuild and recompile the code. And in some cases you even don’t need to restart the app.
selfservice-ext.war/WEB-INF/jsp/pub/company/

This is a folder where we put all JSP files (page views) for the customer's Account Claim flow. These files can also be changed by the customer as well.

From the example above, you can see that it’s possible to write quite complex programs extending existing OpenIAM services using XML and Groovy languages. If OpenIAM core doesn’t include the functionality that customer needs, he can write a Service or Controller and put into the Selfservice-Ext module.

  selfservice-ext-servlet.xml          includes the link to the customer's Spring webflow config file:

...

Code Block
languagexml
<webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices">
        <webflow:flow-location path="/WEB-INF/flows/pub/accountClaim.xml" id="pub/accountClaim" />
    </webflow:flow-registry>
and <lang:groovy id="employeeService" proxy-target-class="true" script-source="/WEB-INF/groovy/EmployeeService.groovy">
    <lang:property name="defaultManagedSysId" value="${org.openiam.defaultManagedSysId}"/>
    <lang:property name="challengeResponseGroup" value="${org.openiam.selfservice.challenge.response.group}"/>
    <lang:property name="secureAnswers" value="${org.openiam.ui.challenge.answers.secured}"/>
    <lang:property name="managedSysIdForLogin" value="${org.openiam.ui.ext.claim.managed.sys.login}"/>
</lang:groovy>


If you want display not default login, you need  set variable in openiam.ui.properties :

org.openiam.ui.ext.claim.managed.sys.login=101

where "101" - is managed system id.  Login for this managed system, will display on  "set password"  and "result" pages.


For add custom link to login page, you need use groovy script conf/iamscripts/selfservice/CustomLoginPageDisplayHandler.groovy. For example :
Code Block
@Override
    public List<Hyperlink> getAdditionalHyperlinks() {
        def accountClaimLink = new Hyperlink(href: '../selfservice-ext/pub/accountClaim.html', text: 'Claim your account')
        return [accountClaimLink]
        //return []
    }