PublicClientApplicationConfiguration Class

  • java.lang.Object
    • com.microsoft.identity.client.PublicClientApplicationConfiguration

public class PublicClientApplicationConfiguration

Field Summary

Modifier and Type Field and Description
final String INVALID_REDIRECT_MSG

Method Summary

Modifier and Type Method and Description
Boolean authorizationInCurrentTask()
void checkIntentFilterAddedToAppManifestForBrokerFlow()
AccountMode getAccountMode()

Gets the currently configured AccountMode for the PublicClientApplication.

Context getAppContext()
List<Authority> getAuthorities()

Gets the list of authorities configured by the developer for use with the PublicClientApplication.

AuthorizationAgent getAuthorizationAgent()

Gets the currently configured AuthorizationAgent for the PublicClientApplication.

List<BrowserDescriptor> getBrowserSafeList()

Gets the list of browser safe list.

String getClientCapabilities()

Gets the currently configured capabilities for the PublicClientApplication.

String getClientId()

Gets the currently configured client id for the PublicClientApplication.

Authority getDefaultAuthority()
Environment getEnvironment()

Gets the environment (Production, PPE) that the public client application is registered in

HttpConfiguration getHttpConfiguration()

Gets the currently configured HttpConfiguration for the PublicClientApplication.

boolean getIsSharedDevice()
LoggerConfiguration getLoggerConfiguration()

Gets the currently configured LoggerConfiguration for the PublicClientApplication.

Boolean getMultipleCloudsSupported()

Indicates whether the PublicClientApplication supports multiple clouds. Automatic redirection to the cloud associated with the authenticated user

String getRedirectUri()

Gets the currently configured redirect uri for the PublicClientApplication.

String getRequiredBrokerProtocolVersion()

Indicates the minimum required broker protocol version number.

TelemetryConfiguration getTelemetryConfiguration()

Gets the currently configured TelemetryConfiguration for the PublicClientApplication.

Boolean getUseBroker()

Indicates whether the PublicClientApplication would like to leverage the broker if available.

The client must have registered

boolean isBrokerRedirectUri(final @NonNull String redirectUri, final @NonNull String packageName)
boolean isDefaultAuthorityConfigured()
Boolean isPowerOptCheckForEnabled()
boolean isWebViewZoomControlsEnabled()
boolean isWebViewZoomEnabled()
void setClientId(final String clientId)

Sets the configured client id for the PublicClientApplication.

@param The configured clientId.

void setPowerOptCheckEnabled(Boolean powerOptCheckEnabled)
void setRedirectUri(@NonNull final String redirectUri)

Sets the configured redirect uri for the PublicClientApplication.

void setTokenCacheSecretKeys(@NonNull final byte[] rawKey)

Sets the secret key bytes to use when encrypting/decrypting cache entries. java.security.spec.KeySpec algorithm is AES.

void setWebViewZoomControlsEnabled(boolean webViewZoomControlsEnabled)
void setWebViewZoomEnabled(boolean webViewZoomEnabled)

Field Details

INVALID_REDIRECT_MSG

public static final String INVALID_REDIRECT_MSG= "Invalid, null, or malformed redirect_uri supplied"

Method Details

authorizationInCurrentTask

public Boolean authorizationInCurrentTask()

checkIntentFilterAddedToAppManifestForBrokerFlow

public void checkIntentFilterAddedToAppManifestForBrokerFlow()

getAccountMode

public AccountMode getAccountMode()

Gets the currently configured AccountMode for the PublicClientApplication.

Returns:

The AccountMode supported by this application.

getAppContext

public Context getAppContext()

getAuthorities

public List getAuthorities()

Gets the list of authorities configured by the developer for use with the PublicClientApplication.

Returns:

The List of current Authorities.

getAuthorizationAgent

public AuthorizationAgent getAuthorizationAgent()

Gets the currently configured AuthorizationAgent for the PublicClientApplication.

Returns:

The AuthorizationAgent to use.

getBrowserSafeList

public List getBrowserSafeList()

Gets the list of browser safe list.

Returns:

The list of browser which are allowed to use for auth flow.

getClientCapabilities

public String getClientCapabilities()

Gets the currently configured capabilities for the PublicClientApplication.

Returns:

The capabilities supported by this application.

getClientId

public String getClientId()

Gets the currently configured client id for the PublicClientApplication.

Returns:

The configured clientId.

getDefaultAuthority

public Authority getDefaultAuthority()

getEnvironment

public Environment getEnvironment()

Gets the environment (Production, PPE) that the public client application is registered in

Returns:

The environment

getHttpConfiguration

public HttpConfiguration getHttpConfiguration()

Gets the currently configured HttpConfiguration for the PublicClientApplication.

Returns:

The HttpConfiguration to use.

getIsSharedDevice

public boolean getIsSharedDevice()

getLoggerConfiguration

public LoggerConfiguration getLoggerConfiguration()

Gets the currently configured LoggerConfiguration for the PublicClientApplication.

Returns:

The LoggerConfiguration to use.

getMultipleCloudsSupported

public Boolean getMultipleCloudsSupported()

Indicates whether the PublicClientApplication supports multiple clouds. Automatic redirection to the cloud associated with the authenticated user

Returns:

The boolean indicator of whether multiple clouds are supported by this application.

getRedirectUri

public String getRedirectUri()

Gets the currently configured redirect uri for the PublicClientApplication.

Returns:

The redirectUri to use.

getRequiredBrokerProtocolVersion

public String getRequiredBrokerProtocolVersion()

Indicates the minimum required broker protocol version number.

Returns:

String of broker protocol version

getTelemetryConfiguration

public TelemetryConfiguration getTelemetryConfiguration()

Gets the currently configured TelemetryConfiguration for the PublicClientApplication.

Returns:

The TelemetryConfiguration to use.

getUseBroker

public Boolean getUseBroker()

Indicates whether the PublicClientApplication would like to leverage the broker if available.

The client must have registered

Returns:

The boolean indicator of whether or not to use the broker.

isBrokerRedirectUri

public static boolean isBrokerRedirectUri(final @NonNull String redirectUri, final @NonNull String packageName)

Parameters:

redirectUri
packageName

isDefaultAuthorityConfigured

public boolean isDefaultAuthorityConfigured()

isPowerOptCheckForEnabled

public Boolean isPowerOptCheckForEnabled()

isWebViewZoomControlsEnabled

public boolean isWebViewZoomControlsEnabled()

isWebViewZoomEnabled

public boolean isWebViewZoomEnabled()

setClientId

public void setClientId(final String clientId)

Sets the configured client id for the PublicClientApplication.

@param The configured clientId.

Parameters:

clientId

setPowerOptCheckEnabled

public void setPowerOptCheckEnabled(Boolean powerOptCheckEnabled)

Parameters:

powerOptCheckEnabled

setRedirectUri

public void setRedirectUri(@NonNull final String redirectUri)

Sets the configured redirect uri for the PublicClientApplication.

Parameters:

redirectUri - The redirectUri to use.

setTokenCacheSecretKeys

public void setTokenCacheSecretKeys(@NonNull final byte[] rawKey)

Sets the secret key bytes to use when encrypting/decrypting cache entries. java.security.spec.KeySpec algorithm is AES.

Parameters:

rawKey - The SecretKey to use in its primary encoding format.

setWebViewZoomControlsEnabled

public void setWebViewZoomControlsEnabled(boolean webViewZoomControlsEnabled)

Parameters:

webViewZoomControlsEnabled

setWebViewZoomEnabled

public void setWebViewZoomEnabled(boolean webViewZoomEnabled)

Parameters:

webViewZoomEnabled

Applies to