public abstract static class AbstractClientApplicationBase.Builder<T extends AbstractClientApplicationBase.Builder<T>> extends AbstractApplicationBase.Builder<T>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isInstanceDiscoveryEnabled |
| Constructor and Description |
|---|
Builder(String clientId)
Constructor to create instance of Builder of client application
|
| Modifier and Type | Method and Description |
|---|---|
T |
aadInstanceDiscoveryResponse(String val)
Sets instance discovery response data which will be used for determining tenant discovery
endpoint and authority aliases.
|
T |
applicationName(String val)
Sets application name for telemetry purposes
|
T |
applicationVersion(String val)
Sets application version for telemetry purposes
|
T |
authority(String val)
Set URL of the authenticating authority or security token service (STS) from which MSAL
will acquire security tokens.
|
T |
autoDetectRegion(boolean val)
Indicates that the library should attempt to discover the Azure region the application is running in when
fetching the instance discovery metadata.
|
T |
azureRegion(String val)
Set the region that the library will use to format authorities in token requests.
|
T |
b2cAuthority(String val)
Set URL of the authenticating B2C authority from which MSAL will acquire tokens
Valid B2C authorities should look like: https://<something.b2clogin.com/<tenant>/<policy>
MSAL Java also supports a legacy B2C authority format, which looks like: https://<host>/tfp/<tenant>/<policy>
However, MSAL Java will eventually stop supporting the legacy format.
|
T |
clientCapabilities(Set<String> capabilities) |
T |
instanceDiscovery(boolean val)
Historically, MSAL would connect to a central endpoint located at
``https://login.microsoftonline.com`` to acquire some metadata, especially when using an unfamiliar authority.
|
T |
setTokenCacheAccessAspect(ITokenCacheAccessAspect val)
Sets ITokenCacheAccessAspect to be used for cache_data persistence.
|
T |
validateAuthority(boolean val)
Set a boolean value telling the application if the authority needs to be verified
against a list of known authorities.
|
connectTimeoutForDefaultHttpClient, correlationId, executorService, httpClient, logPii, proxy, readTimeoutForDefaultHttpClient, sslSocketFactorypublic Builder(String clientId)
clientId - Client ID (Application ID) of the application as registered
in the application registration portal (portal.azure.com)public T authority(String val) throws MalformedURLException
IApplicationBase.DEFAULT_AUTHORITYval - a string value of authorityMalformedURLException - if val is malformed URLpublic T b2cAuthority(String val) throws MalformedURLException
val - a boolean value for validateAuthorityMalformedURLExceptionpublic T validateAuthority(boolean val)
AbstractClientApplicationBase.aadAadInstanceDiscoveryResponse
The default value is true.
val - a boolean value for validateAuthoritypublic T applicationName(String val)
val - application namepublic T applicationVersion(String val)
val - application versionpublic T setTokenCacheAccessAspect(ITokenCacheAccessAspect val)
val - an instance of ITokenCacheAccessAspectpublic T aadInstanceDiscoveryResponse(String val)
Note that authority validation is not done even if AbstractClientApplicationBase.validateAuthority
is set to true.
For more information, see https://aka.ms/msal4j-instance-discovery
val - JSON formatted value of response from AAD instance discovery endpointpublic T autoDetectRegion(boolean val)
AbstractClientApplicationBase.azureRegion at the same time,
the region set with AbstractClientApplicationBase.azureRegion will take priority if there is a mismatch.
See here for more information about supported scenarios: https://aka.ms/msal4j-azure-regionsval - boolean (default is false)public T azureRegion(String val)
AbstractClientApplicationBase.autoDetectRegion at the same time
the specific region set here will take priority over the autodetected region if there is a mismatch.
See here for more information about supported scenarios: https://aka.ms/msal4j-azure-regionsval - String region namepublic T instanceDiscovery(boolean val)
Copyright © 2013–2024. All rights reserved.