public class MSALControllerFactory
extends java.lang.Object
| Constructor and Description |
|---|
MSALControllerFactory() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
brokerEligible(android.content.Context applicationContext,
Authority authority,
PublicClientApplicationConfiguration applicationConfiguration)
Determine if request is eligible to use the broker
|
static java.util.List<BaseController> |
getAllControllers(android.content.Context applicationContext,
Authority authority,
PublicClientApplicationConfiguration applicationConfiguration)
Returns one or more controllers to address a given request.
|
static BaseController |
getDefaultController(android.content.Context applicationContext,
Authority authority,
PublicClientApplicationConfiguration applicationConfiguration)
Returns the appropriate MSAL Controller depending on Authority, App and Device state
|
public static BaseController getDefaultController(android.content.Context applicationContext,
Authority authority,
PublicClientApplicationConfiguration applicationConfiguration)
throws MsalClientException
1) The client indicates it wants to use broker 2) If not AAD Authority use local controller 3) If the the authority is AAD and the Audience is instance of AnyPersonalAccount Use the local controller 4) If broker is not installed use local controller 5) Otherwise return broker controller
MsalClientExceptionpublic static java.util.List<BaseController> getAllControllers(android.content.Context applicationContext,
Authority authority,
PublicClientApplicationConfiguration applicationConfiguration)
throws MsalClientException
The order of the response matters. The local controller should be returned first in order to ensure that any local refresh tokens are preferred over the use of the broker
Only return the broker controller when the following are true:
1) The client indicates it wants to use broker 2) The authority is AAD 3) The audience is not AnyPersonalAccount 4) The broker is installed 5) The broker redirect URI for the client is registered
MsalClientExceptionpublic static boolean brokerEligible(android.content.Context applicationContext,
Authority authority,
PublicClientApplicationConfiguration applicationConfiguration)
throws MsalClientException
Client indicates that it wants to use broker Authority == AzureActiveDirectoryAuthority Audience != AnyPersonalAccounts Broker Installed & Verified
applicationContext - authority - applicationConfiguration - MsalClientException