public static class PublicClientApplication.Builder extends Object
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 |
b2cAuthority(String val) |
PublicClientApplication |
build() |
T |
correlationId(String val)
Set optional correlation id to be used by the API.
|
T |
executorService(ExecutorService val)
Sets ExecutorService to be used to execute the requests.
|
T |
httpClient(IHttpClient val)
Sets HTTP client to be used by the client application for all HTTP requests.
|
T |
logPii(boolean val)
Set logPii - boolean value, which determines
whether Pii (personally identifiable information) will be logged in.
|
T |
proxy(Proxy val)
Sets Proxy configuration to be used by the client application (MSAL4J by default uses
HttpsURLConnection ) for all network communication. |
protected PublicClientApplication.Builder |
self() |
T |
setTokenCacheAccessAspect(ITokenCacheAccessAspect val)
Sets ITokenCacheAccessAspect to be used for cache_data persistence.
|
T |
sslSocketFactory(SSLSocketFactory val)
Sets SSLSocketFactory to be used by the client application for all network communication.
|
T |
validateAuthority(boolean val)
Set a boolean value telling the application if the authority needs to be verified
against a list of known authorities.
|
public PublicClientApplication build()
protected PublicClientApplication.Builder self()
public T authority(String val) throws MalformedURLException
IClientApplicationBase.DEFAULT_AUTHORITY
val
- a string value of authorityMalformedURLException
- if val is malformed URLpublic T b2cAuthority(String val) throws MalformedURLException
MalformedURLException
public T validateAuthority(boolean val)
ClientApplicationBase.aadAadInstanceDiscoveryResponse
The default value is true.val
- a boolean value for validateAuthoritypublic T correlationId(String val)
val
- a string value of correlation idpublic T logPii(boolean val)
val
- a boolean value for logPiipublic T executorService(ExecutorService val)
val
- an instance of ExecutorServicepublic T proxy(Proxy val)
HttpsURLConnection
) for all network communication.
If no proxy value is passed in, system defined properties are used. If HTTP client is set on
the client application (via ClientApplication.builder().httpClient()),
proxy configuration should be done on the HTTP client object being passed in,
and not through this method.val
- an instance of Proxypublic T httpClient(IHttpClient val)
val
- Implementation of IHttpClient
public T sslSocketFactory(SSLSocketFactory val)
val
- an instance of SSLSocketFactorypublic 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)
ClientApplicationBase.validateAuthority
is set to true.
For more information, see
https://aka.ms/msal4j-instance-discoveryval
- JSON formatted value of response from AAD instance discovery endpointCopyright © 2013–2020. All rights reserved.