Skip to main content

Enabling Self Registration in Identity Server 5.3.0

Self Registration is an important feature when in comes to commercial applications. This feature allows the users the priviledge of being a part of your community without you having to go through the hassle of adding them. Mentioning ihis Identity Server also allows the capability to restrict or revise the approvals before granting access but we will be discussing that in a seperate post.

This post will guide you on how you can enable the Self Registration feature using the self registration REST APIs at a global level for the WSO2 Identity Server 5.3.0.

You can try the Rest service through Identity Server login page (https://localhost:9443/dashboard)


There are two ways in which you can enable the feature.

1. Enable it at a global level across the whole platform.
2. Enable it per tenant basis.

Let's discuss how to enable it a global level across the whole platform..

Pre requisite 

  • Extracted WSO2 Identity Server 5.3.0. Let's name this as <WSO2_IS_HOME>

Enabling the Self Registration Feature at a global level with Recaptcha.


1. Navigate to <WSO2_IS_HOME>/repository/conf/identity/identity.xml file and comment out the below config block.

NOTE : PLEASE NOTE IF WE NEED TO ENABLE THIS AT A GLOBAL LEVEL IT NEEDS TO BE DONE BEFORE WE START UP  THE IDENTITY SERVER INSTANCE.

<SelfRegistration>
        <Enable>true</Enable>
        <LockOnCreation>true</LockOnCreation>
        <Notification>
            <InternallyManage>true</InternallyManage>
        </Notification>
        <ReCaptcha>true</ReCaptcha>
 </SelfRegistration>

Let's see what these configs mean.



2. Next we need to make sure some listeners are enabled in order for it to work when the operations are invoked.

In the same identity.xml file make sure the below configs are enabled/disabled. These are usually set by default in the product unless you have made any changes.
  • <EventListener ype="org.wso2.carbon.user.core.listener.UserOperationEventListener"name="org.wso2.carbon.identity.mgt.IdentityMgtEventListener" orderId="50" enable="false"/> 
  • <EventListener type="org.wso2.carbon.user.core.listener.UserOperationEventListener" name="org.wso2.carbon.identity.governance.listener.IdentityStoreEventListener" orderId="97" enable="true"> 
  • <EventListener type="org.wso2.carbon.user.core.listener.UserOperationEventListener" name="org.wso2.carbon.identity.scim.common.listener.SCIMUserOperationListener orderId="90" enable="true"/>
3. Configure email setting in <WSO2_IS_HOME>/repository/conf/output-event-adapters.xml file.

Hint: Search for the word 'email' in the file and you should be able to find the below block. Provide the email provider information and save it.


Now all the configurations needed for the self registration feature are done. Now we need to enable recaptcha.

4. Setup recaptcha as described in this documentation.

5. Now you can start up the identity server.

6. Once you start up navigate to the url https://localhost:9443/dashboard.

(This is for the default offset 0, if you have changed the offset please modify the port accordingly in the url).

In this dashboard which is shown above you will be able to see a link as Register Now. Click on that link and you will be directed to a screen as shown below.

You can provide the details and self register and enjoy this capability.



I hope this helped to understand how to enable the feature at a global level. In my next post I will be talking about how to customize the self signup registration page using claims.

References:

[1] https://docs.wso2.com/display/IS530/Configuring+reCaptcha+for+Self+Registration
[2] https://docs.wso2.com/display/IS530/Setting+Up+ReCaptcha
[3] https://docs.wso2.com/display/IS530/Self+Sign+Up+Using+REST+APIs
[4] https://docs.wso2.com/display/IS530/Self+Sign+Up+and+Account+Confirmation

Comments

Popular posts from this blog

WSO2 Cloud

Introduction WSO2 Cloud consists of three commercial cloud offerings namely the API cloud, Integration Cloud and the Identity Cloud. WSO2 Integration Cloud WSO2 Integration Cloud is a public hosted version of the powerful, 100% open-source WSO2 Enterprise Integrator. It allows you to host your cloud-to-cloud, cloud-to-on-premise integrations and API backends on a scalable cloud platform WSO2 API Cloud WSO2 API Cloud is an enterprise-ready, self-service platform that enables you to expose business capabilities as managed APIs and leverage off-the-shelf potential for advertising and selling business APIs. The API Cloud supports all aspects of an API’s lifecycle, from its creation to publication and retirement. The API Cloud is based on WSO2 API Manager , WSO2’s complete solution for designing and publishing APIs and managing a developer community. [2] WSO2 Identity Cloud WSO2 Identity Cloud leverages the functionality of WSO2 Identity Server’s identity and ac...

Adding error sequence to a custom sequence

In my previous posi i explained how to call an endpoint using the call mediator. Usually when errors are thrown from the call mediator we can handle them using a custom sequence. When call mediators fails the execution stops hence handling errors is very essential. For this post I will be modifying the same sequence which i created in the blog post [1] The change which we need to do is we need to modify the sequence definition to map with the error sequence as shown below. You can find the modified sequence here . <sequence xmlns="http://ws.apache.org/ns/synapse" name="countrySequenceWithError" onError="countryErrorSequence"> <property name="uri.var.countryCode" expression="$url:countryCode"/> <property name="REST_URL_POSTFIX" scope="axis2" action="remove"/>     <call blocking="true">         <endpoint>             <http method="get" uri-temp...

Exposing a SOAP service as a REST API

In this post i will be explaining how we can transform a SOAP based backend to receive requests in a restful manner through the WSO2 API Cloud. Steps. First log into the WSO2 Cloud and navigate to the API Cloud. In the API cloud select the option to add a new API. We will be creating an API to demonstrate an invocation to the backend soap service ws.cdyne.com/phoneverify/phoneverify.asmx?wsdl Give a name, context and version to the API and add a resource name with a GET Method. The resource name can be anything which you like since we will invoke the actual service usiing a custom sequence. Mention the URI template as indicated in the below screenshot. Next go to the implement tab. And select the endpoint type as HTTP/SOAP Endpoint and specify the endpoint as http://ws.cdyne.com/phoneverify/phoneverify.asmx. There is an important step we need to do here. We need to set the SOAP version for this request. In order to do that we need to select the advanced option ...