InteractiveBrowserBrokerCredentialBuilder Class

public class InteractiveBrowserBrokerCredentialBuilder
extends InteractiveBrowserCredentialBuilder

Fluent credential builder for instantiating a InteractiveBrowserCredential configured to use a secure broker.

Sample: Construct a InteractiveBrowserCredential for brokered authentication

the following code sample shows to use this type:

InteractiveBrowserBrokerCredentialBuilder builder = new InteractiveBrowserBrokerCredentialBuilder();
 InteractiveBrowserCredential credential = builder.build();

Constructor Summary

Constructor Description
InteractiveBrowserBrokerCredentialBuilder()

Method Summary

Modifier and Type Method and Description
InteractiveBrowserBrokerCredentialBuilder addPolicy(HttpPipelinePolicy policy)
InteractiveBrowserBrokerCredentialBuilder additionallyAllowedTenants(String[] additionallyAllowedTenants)
InteractiveBrowserBrokerCredentialBuilder additionallyAllowedTenants(List<String> additionallyAllowedTenants)
InteractiveBrowserBrokerCredentialBuilder authenticationRecord(AuthenticationRecord authenticationRecord)
InteractiveBrowserBrokerCredentialBuilder authorityHost(String authorityHost)
InteractiveBrowserBrokerCredentialBuilder browserCustomizationOptions(BrowserCustomizationOptions browserCustomizationOptions)
InteractiveBrowserBrokerCredentialBuilder clientId(String clientId)
InteractiveBrowserBrokerCredentialBuilder clientOptions(ClientOptions clientOptions)
InteractiveBrowserBrokerCredentialBuilder configuration(Configuration configuration)
InteractiveBrowserBrokerCredentialBuilder disableAutomaticAuthentication()
InteractiveBrowserBrokerCredentialBuilder disableInstanceDiscovery()
InteractiveBrowserBrokerCredentialBuilder enableAccountIdentifierLogging()
InteractiveBrowserBrokerCredentialBuilder enableLegacyMsaPassthrough()

Enables Microsoft Account (MSA) pass-through.

InteractiveBrowserBrokerCredentialBuilder enableUnsafeSupportLogging()
InteractiveBrowserBrokerCredentialBuilder executorService(ExecutorService executorService)
InteractiveBrowserBrokerCredentialBuilder httpClient(HttpClient client)
InteractiveBrowserBrokerCredentialBuilder httpLogOptions(HttpLogOptions logOptions)
InteractiveBrowserBrokerCredentialBuilder httpPipeline(HttpPipeline httpPipeline)
InteractiveBrowserBrokerCredentialBuilder loginHint(String loginHint)
InteractiveBrowserBrokerCredentialBuilder maxRetry(int maxRetry)
InteractiveBrowserBrokerCredentialBuilder pipeline(HttpPipeline pipeline)
InteractiveBrowserBrokerCredentialBuilder port(int port)
InteractiveBrowserBrokerCredentialBuilder proxyOptions(ProxyOptions proxyOptions)
InteractiveBrowserBrokerCredentialBuilder redirectUrl(String redirectUrl)
InteractiveBrowserBrokerCredentialBuilder retryOptions(RetryOptions retryOptions)
InteractiveBrowserBrokerCredentialBuilder retryPolicy(RetryPolicy retryPolicy)
InteractiveBrowserBrokerCredentialBuilder retryTimeout(Function<Duration,Duration> retryTimeout)
InteractiveBrowserBrokerCredentialBuilder setWindowHandle(long windowHandle)

Sets the parent window handle used by the broker.

InteractiveBrowserBrokerCredentialBuilder tenantId(String tenantId)
InteractiveBrowserBrokerCredentialBuilder tokenCachePersistenceOptions(TokenCachePersistenceOptions tokenCachePersistenceOptions)
InteractiveBrowserCredentialBuilder useDefaultBrokerAccount()

Enables automatically using the default broker account for authentication instead of prompting the user with an account picker.

Methods inherited from AadCredentialBuilderBase

Methods inherited from CredentialBuilderBase

Methods inherited from InteractiveBrowserCredentialBuilder

Methods inherited from java.lang.Object

Constructor Details

InteractiveBrowserBrokerCredentialBuilder

public InteractiveBrowserBrokerCredentialBuilder()

Method Details

addPolicy

public InteractiveBrowserBrokerCredentialBuilder addPolicy(HttpPipelinePolicy policy)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.addPolicy(HttpPipelinePolicy policy)

Parameters:

policy

additionallyAllowedTenants

public InteractiveBrowserBrokerCredentialBuilder additionallyAllowedTenants(String[] additionallyAllowedTenants)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.additionallyAllowedTenants(String[] additionallyAllowedTenants)

Parameters:

additionallyAllowedTenants

additionallyAllowedTenants

public InteractiveBrowserBrokerCredentialBuilder additionallyAllowedTenants(List additionallyAllowedTenants)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.additionallyAllowedTenants(List<String> additionallyAllowedTenants)

Parameters:

additionallyAllowedTenants

authenticationRecord

public InteractiveBrowserBrokerCredentialBuilder authenticationRecord(AuthenticationRecord authenticationRecord)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.authenticationRecord(AuthenticationRecord authenticationRecord)

Parameters:

authenticationRecord

authorityHost

public InteractiveBrowserBrokerCredentialBuilder authorityHost(String authorityHost)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.authorityHost(String authorityHost)

Parameters:

authorityHost

browserCustomizationOptions

public InteractiveBrowserBrokerCredentialBuilder browserCustomizationOptions(BrowserCustomizationOptions browserCustomizationOptions)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.browserCustomizationOptions(BrowserCustomizationOptions browserCustomizationOptions)

Parameters:

browserCustomizationOptions

clientId

public InteractiveBrowserBrokerCredentialBuilder clientId(String clientId)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.clientId(String clientId)

Parameters:

clientId

clientOptions

public InteractiveBrowserBrokerCredentialBuilder clientOptions(ClientOptions clientOptions)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.clientOptions(ClientOptions clientOptions)

Parameters:

clientOptions

configuration

public InteractiveBrowserBrokerCredentialBuilder configuration(Configuration configuration)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.configuration(Configuration configuration)

Parameters:

configuration

disableAutomaticAuthentication

public InteractiveBrowserBrokerCredentialBuilder disableAutomaticAuthentication()

Overrides:

InteractiveBrowserBrokerCredentialBuilder.disableAutomaticAuthentication()

disableInstanceDiscovery

public InteractiveBrowserBrokerCredentialBuilder disableInstanceDiscovery()

Overrides:

InteractiveBrowserBrokerCredentialBuilder.disableInstanceDiscovery()

enableAccountIdentifierLogging

public InteractiveBrowserBrokerCredentialBuilder enableAccountIdentifierLogging()

Overrides:

InteractiveBrowserBrokerCredentialBuilder.enableAccountIdentifierLogging()

enableLegacyMsaPassthrough

public InteractiveBrowserBrokerCredentialBuilder enableLegacyMsaPassthrough()

Enables Microsoft Account (MSA) pass-through. This allows the user to sign in with a Microsoft Account (MSA) instead of a work or school account.

Returns:

An updated instance of this builder with enable Legacy MSA Passthrough set to true.

enableUnsafeSupportLogging

public InteractiveBrowserBrokerCredentialBuilder enableUnsafeSupportLogging()

Overrides:

InteractiveBrowserBrokerCredentialBuilder.enableUnsafeSupportLogging()

executorService

public InteractiveBrowserBrokerCredentialBuilder executorService(ExecutorService executorService)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.executorService(ExecutorService executorService)

Parameters:

executorService

httpClient

public InteractiveBrowserBrokerCredentialBuilder httpClient(HttpClient client)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.httpClient(HttpClient client)

Parameters:

client

httpLogOptions

public InteractiveBrowserBrokerCredentialBuilder httpLogOptions(HttpLogOptions logOptions)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.httpLogOptions(HttpLogOptions logOptions)

Parameters:

logOptions

httpPipeline

public InteractiveBrowserBrokerCredentialBuilder httpPipeline(HttpPipeline httpPipeline)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.httpPipeline(HttpPipeline httpPipeline)

Parameters:

httpPipeline

loginHint

public InteractiveBrowserBrokerCredentialBuilder loginHint(String loginHint)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.loginHint(String loginHint)

Parameters:

loginHint

maxRetry

public InteractiveBrowserBrokerCredentialBuilder maxRetry(int maxRetry)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.maxRetry(int maxRetry)

Parameters:

maxRetry

pipeline

public InteractiveBrowserBrokerCredentialBuilder pipeline(HttpPipeline pipeline)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.pipeline(HttpPipeline pipeline)

Parameters:

pipeline

port

public InteractiveBrowserBrokerCredentialBuilder port(int port)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.port(int port)

Parameters:

port

proxyOptions

public InteractiveBrowserBrokerCredentialBuilder proxyOptions(ProxyOptions proxyOptions)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.proxyOptions(ProxyOptions proxyOptions)

Parameters:

proxyOptions

redirectUrl

public InteractiveBrowserBrokerCredentialBuilder redirectUrl(String redirectUrl)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.redirectUrl(String redirectUrl)

Parameters:

redirectUrl

retryOptions

public InteractiveBrowserBrokerCredentialBuilder retryOptions(RetryOptions retryOptions)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.retryOptions(RetryOptions retryOptions)

Parameters:

retryOptions

retryPolicy

public InteractiveBrowserBrokerCredentialBuilder retryPolicy(RetryPolicy retryPolicy)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.retryPolicy(RetryPolicy retryPolicy)

Parameters:

retryPolicy

retryTimeout

public InteractiveBrowserBrokerCredentialBuilder retryTimeout(Function retryTimeout)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.retryTimeout(Function<Duration,Duration> retryTimeout)

Parameters:

retryTimeout

setWindowHandle

public InteractiveBrowserBrokerCredentialBuilder setWindowHandle(long windowHandle)

Sets the parent window handle used by the broker. For use on Windows only.

Parameters:

windowHandle - The window handle of the current application, or 0 for a console application.

Returns:

An updated instance of this builder with the interactive browser broker configured.

tenantId

public InteractiveBrowserBrokerCredentialBuilder tenantId(String tenantId)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.tenantId(String tenantId)

Parameters:

tenantId

tokenCachePersistenceOptions

public InteractiveBrowserBrokerCredentialBuilder tokenCachePersistenceOptions(TokenCachePersistenceOptions tokenCachePersistenceOptions)

Overrides:

InteractiveBrowserBrokerCredentialBuilder.tokenCachePersistenceOptions(TokenCachePersistenceOptions tokenCachePersistenceOptions)

Parameters:

tokenCachePersistenceOptions

useDefaultBrokerAccount

public InteractiveBrowserCredentialBuilder useDefaultBrokerAccount()

Enables automatically using the default broker account for authentication instead of prompting the user with an account picker.

Returns:

An updated instance of this builder with useDefaultBrokerAccount set.

Applies to