This section provides instructions on how to configure the Token2 authenticator and WSO2 Identity Server using a sample app. See the following sections for more information. Info |
---|
Token2 Authenticator is supported by WSO2 Identity Server versions 5.1.0 and 5.2.0. |
Anchor |
---|
| Configuring the token2 provider |
---|
| Configuring the token2 provider |
---|
|
Deploying Token2 artifactsThe artifacts can be obtained from the store for this authenticator. - Place the
token2authenticationendpoint. war file into the <IS_HOME>/repository/deployment/server/webapps directory. Place the org.wso2.carbon.extension.identity.authenticator.token2.connector-1.0.0.jar file into the <IS_HOME>/repository/components/dropins directory.
Note |
---|
If you want to upgrade the Token2 Authenticator in your existing IS pack, please refer upgrade instructions. |
Anchor |
---|
| ConfiguringtheToken2HWDevice |
---|
| ConfiguringtheToken2HWDevice |
---|
| Configuring the Token2 hardware device- Register a Token2 account using "https://token2.com/register". Ensure that you do the following.
- Enter the Mobile phone number in e164 format (+94 77 ** ** ***)
- Select SMS Based as the User type.
- Click Register.
- Once you have registered with Token2, log in using your email, password and the OTP that is sent to the registered mobile number through Token2.
- Add a new site using "https://token2.com/manage" and obtain the API Key and site_id for the site.
- As mentioned in the Token2 API page, create the user and you can find the userid in the response.
- You have to obtain the hardware token device and send the userid, site_id and token serial number to Token2 support to enable it.
- Then logout and login again with your email, password and use the token generated in the hardware token device.
You have now enabled the token2 hardware device. Anchor |
---|
| Deploying travelocity.com sample |
---|
| Deploying travelocity.com sample |
---|
| Deploying travelocity.com sampleThe next step is to deploy the sample app in order to use it in this scenario. Once this is done, the next step is to configure the WSO2 Identity Server by adding an identity provider and a service provider. Anchor |
---|
| Configuring the identity provider |
---|
| Configuring the identity provider |
---|
| Configuring the identity providerNow you have to configure WSO2 Identity Server by adding a new identity provider. Download the WSO2 Identity Server from here. - Run the WSO2 Identity Server.
- Log in to the management console as an administrator.
- In the Identity Providers section under the Main tab of the management console, click Add.
- Give a suitable name for Identity Provider Name (e.g., token2).
- Navigate to Token2Authenticator Configuration under Federated Authenticators.
Select both check boxes to Enable the Token2 authenticator and make it the Default.
Enter the following values: - Click Register.
You have now added the identity provider.
Anchor |
---|
| Configuring User Claims |
---|
| Configuring User Claims |
---|
| Configuring user claims- In the Main menu, click Add under Claims.
- Click Add New Claim.
Click Add Local Claim. The Dialect URI will be automatically set to http://wso2.org/claims , which is the internal claim dilectclaim dialect. Insert excerpt |
---|
| IS530:Adding Claim Mapping |
---|
| IS530:Adding Claim Mapping |
---|
MultiExcerptName | Claims |
---|
nopanel | true |
---|
PageWithExcerpt | IS530:Adding Claim Mapping |
---|
|
- Next click List under Main > Identity > Users and Roles.
- Click User Profile under Admin and update the User Id.
Now you have configured the claim.
Anchor |
---|
| Configuring the service provider |
---|
| Configuring the service provider |
---|
|
Configuring the service providerThe next step is to configure the service provider. Return to the management console. In the Identity section under the Main tab, click Add under Service Providers. Enter travelocity.com in the Service Provider Name text box and click Register. In the Inbound Authentication Configuration section, click Configure under the SAML2 Web SSO Configuration section.
Expand |
---|
title | Click here to view the field definitions |
---|
| Insert excerpt |
---|
| IS530:Configuring SAML2 Web Single-Sign-On |
---|
| IS530:Configuring SAML2 Web Single-Sign-On |
---|
nopanel | true |
---|
|
|
Now set the configuration as follows: Issuer: travelocity.com Assertion Consumer URL: http://localhost:8080/travelocity.com/home.jsp
- Select the following check-boxes:
Enable Response Signing Enable Single Logout Enable Attribute Profile - Include Attributes in the Response Always
Click Update to save the changes. Now you will be sent back to the Service Providers page. Go to Claim configuration and select the userId claim as Subject Claim URI.
Go to Local and Outbound Authentication Configuration section. Select the Advanced configuration radio button option . Add the basic authentication as a first step and token2 authentication as a second step. This is done to configure multi-step authentication. What this means is that a user who logs in would first have to enter their credentials that are configured with the Identity Server and then get authenticated using Token2 as the second step. This is an added security measure and a common use of the Token2 authenticator.
Expand |
---|
title | Click here to view the field definitions |
---|
| Insert excerpt |
---|
| IS530:Configuring Local and Outbound Authentication for a Service Provider |
---|
| IS530:Configuring Local and Outbound Authentication for a Service Provider |
---|
nopanel | true |
---|
|
|
You have now added and configured the service provider.
Anchor |
---|
| Testing the sample |
---|
| Testing the sample |
---|
| Testing the sample- To test the sample, go to the following URL: http://localhost:8080/travelocity.com
Click the link to log in with SAML from WSO2 Identity Server. Basic authentication page will be visible, use your IS username and password.
Enter the code that is generated with token2 hardware device to authenticate. You are directed to the home page of the travelocity.com app.
|