Use the SAP XSUAA Connector

2 minutes to read Download PDF Edit

1 Introduction

The SAP XSUAA Connector enables the use of an external identity provider (IDP) on a Mendix application so that a user can have a single sign-on (SSO) experience on their application.

This how-to will teach you how to do the following:

  • Add the XSUAA Connector to your project
  • Configure the XSUAA connector

2 Prerequisites

Before starting this how-to, make sure you have completed the following prerequisites:

  • Create the app in the Mendix Desktop Modeler 7.5.1 or higher
  • Get the SAP OData Connector module

2.1 Getting the SAP XSUAA Connector Module

To be able to use the SAP XSUAA Connector, after creating your project, navigate to the Mendix App Store to download the SAP XSUAA Connector module. You will then find this module in your app project’s App Store modules.

For more information, see How to Use App Store Content in the Modeler.

3 Using the Connector

In this section, you will learn how to implement the data connector in your Mendix app.

3.1 Adding the OnStartup Microflow to the Application Settings

To add the OnStartup microflow to your application settings, follow these steps:

  1. In the Project Explorer, select Project > Settings and open the Runtime tab.
  2. For the AfterStartup microflow, select the OnStartup microflow:

3.2 Adding the SSO Login Button to the Landing Page

To add the SSO login button to the landing page, follow these steps:

  1. In the top menu of the Desktop Modeler, select Project > Show Project Directory in Explorer.
  2. Open the theme folder.
  3. Open login.html:
  4. Locate this line:

    <div class="login-logo"></div>
    
  5. Below the line above, add this line:

    <a id="ssoButton" href="/xsauaalogin/" class="login-sso-button btn btn-primary">Sign in with your XSUAA account</a>
    

    The XSUAA login button will look like this:

3.3 Redirecting Your Application to XSUAA Without Showing the Login Page (Alternative Method)

An alternative to adding the SSO login button to the landing page of your app is to redirect your app to XSUAA automatically without showing the login page. To accomplish this, follow these steps:

  1. Open the project directory of your project and then open the theme folder.
  2. Change the contents of login.html into the following:

    <!doctype html>
    <html>
        <head>
            <script>
                window.location.assign("/xsauaalogin/")
            </script>
        </head>
    </html>
    

Copyright © Mendix. All rights reserved. | Mendix.com | Terms of Use | Privacy Policy