Skip to content

Authenticating with Multi IDP UAA

Omer Elhiraika edited this page Jun 8, 2017 · 1 revision

When a UAA instance is configured to use multiple Identity Providers (IDPs), the instance prompts a user for their email domain to determine the IDP to be used on login.

You can configure the Predix Mobile SDK to send a login hint containing an email domain so that the right IDP is automatically discovered and used when authenticating.

The examples below display how the PredixMobileConfiguration.loginURLPath can be modified with a login_hint parameter for selecting an IDP:

Android (MainActivity.java):

    ...
    private void initiatePredixMobile(String baseAssetFolderPath, WebView webView) {
        PredixMobileConfiguration.loginURLPath += "?login_hint=example.domain.com";
        PredixMobileConfiguration.baseAssetFolderPath = baseAssetFolderPath;
        ...
    }
    ...

iOS/macOS (AppDelegate.swift):

    ...
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.
        PredixMobilityConfiguration.loginURLPath += "?login_hint=example.domain.com";
        ...
    }
    ...

Desktop (ReferenceApplication.java):

    ...
    private void startPredixMobile(Pane root) {
        PredixMobileConfiguration.loginURLPath += "?login_hint=example.domain.com";
        AuthorizationController authorizationController = new AuthorizationController(root);
        ...
    }
    ...
Clone this wiki locally