Overview
A division is an Eleos provided code that specifies the customer environment the user operates under.
You can specify a user’s division during their initial login, by including their division_code within the authentication response.
The Platform routes users with a specified division to the web services of the associated environment. The routing process includes subsequent verify requests to confirm user permission to use the mobile app.
How It Works
Authentication Architectures
In App Manager, you should configure an authentication service URL for each division or environment associated with your mobile app. You can implement the same or different web service URLs for the authentication service across those divisions depending on system architecture:
Centralized Service: Run a single centralized authentication service for all divisions. Distinguish requests from different divisions using information stored in the
api_token, a query parameter on the service URL, or theEleos-Platform-Keyvalue set for the division.Delegated Service: After the initial login, the central service transfers authentication to the individual authentication services for each environment.
Verification
The api_token returned in the initial login authentication request should also remain valid within the new division authentication service. When swapping over to a different division, the platform immediately issues a follow-up verify request to the specified environment’s web server.
WARNING: Return the
division_codeproperty exclusively in response to a user’s initial login request. If you return this in subsequent authentication requests, it will result in an error.
Moving Divisions
It’s possible to move users from one division to another within the same mobile app by requiring users to log out. Alternatively, you can forcibly log users out by returning an HTTP 401 in response to the next verify request. Both options will require the user to login to the mobile app again, allowing you to return the users new division_code within their authentication response.