Package com.azure.identity.broker
Class InteractiveBrowserBrokerCredentialBuilder
java.lang.Object
com.azure.identity.CredentialBuilderBase<InteractiveBrowserCredentialBuilder>
com.azure.identity.AadCredentialBuilderBase<InteractiveBrowserCredentialBuilder>
com.azure.identity.InteractiveBrowserCredentialBuilder
com.azure.identity.broker.InteractiveBrowserBrokerCredentialBuilder
- All Implemented Interfaces:
com.azure.core.client.traits.HttpTrait<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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadditionallyAllowedTenants(String... additionallyAllowedTenants) additionallyAllowedTenants(List<String> additionallyAllowedTenants) addPolicy(com.azure.core.http.policy.HttpPipelinePolicy policy) authenticationRecord(AuthenticationRecord authenticationRecord) authorityHost(String authorityHost) browserCustomizationOptions(BrowserCustomizationOptions browserCustomizationOptions) clientOptions(com.azure.core.util.ClientOptions clientOptions) configuration(com.azure.core.util.Configuration configuration) Enables Microsoft Account (MSA) pass-through.executorService(ExecutorService executorService) httpClient(com.azure.core.http.HttpClient client) httpLogOptions(com.azure.core.http.policy.HttpLogOptions logOptions) httpPipeline(com.azure.core.http.HttpPipeline httpPipeline) maxRetry(int maxRetry) pipeline(com.azure.core.http.HttpPipeline pipeline) port(int port) proxyOptions(com.azure.core.http.ProxyOptions proxyOptions) redirectUrl(String redirectUrl) retryOptions(com.azure.core.http.policy.RetryOptions retryOptions) retryPolicy(com.azure.core.http.policy.RetryPolicy retryPolicy) retryTimeout(Function<Duration, Duration> retryTimeout) setWindowHandle(long windowHandle) Sets the parent window handle used by the broker.tokenCachePersistenceOptions(TokenCachePersistenceOptions tokenCachePersistenceOptions) Enables automatically using the default broker account for authentication instead of prompting the user with an account picker.Methods inherited from class com.azure.identity.InteractiveBrowserCredentialBuilder
build
-
Constructor Details
-
InteractiveBrowserBrokerCredentialBuilder
public InteractiveBrowserBrokerCredentialBuilder()Creates a new instance ofInteractiveBrowserBrokerCredentialBuilder.
-
-
Method Details
-
setWindowHandle
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.
-
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.
-
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.
-
clientOptions
public InteractiveBrowserBrokerCredentialBuilder clientOptions(com.azure.core.util.ClientOptions clientOptions) - Specified by:
clientOptionsin interfacecom.azure.core.client.traits.HttpTrait<InteractiveBrowserCredentialBuilder>- Overrides:
clientOptionsin classCredentialBuilderBase<InteractiveBrowserCredentialBuilder>
-
addPolicy
public InteractiveBrowserBrokerCredentialBuilder addPolicy(com.azure.core.http.policy.HttpPipelinePolicy policy) - Specified by:
addPolicyin interfacecom.azure.core.client.traits.HttpTrait<InteractiveBrowserCredentialBuilder>- Overrides:
addPolicyin classCredentialBuilderBase<InteractiveBrowserCredentialBuilder>
-
port
- Overrides:
portin classInteractiveBrowserCredentialBuilder
-
additionallyAllowedTenants
public InteractiveBrowserBrokerCredentialBuilder additionallyAllowedTenants(String... additionallyAllowedTenants) - Overrides:
additionallyAllowedTenantsin classInteractiveBrowserCredentialBuilder
-
authenticationRecord
public InteractiveBrowserBrokerCredentialBuilder authenticationRecord(AuthenticationRecord authenticationRecord) - Overrides:
authenticationRecordin classInteractiveBrowserCredentialBuilder
-
browserCustomizationOptions
public InteractiveBrowserBrokerCredentialBuilder browserCustomizationOptions(BrowserCustomizationOptions browserCustomizationOptions) - Overrides:
browserCustomizationOptionsin classInteractiveBrowserCredentialBuilder
-
clientId
- Overrides:
clientIdin classInteractiveBrowserCredentialBuilder
-
configuration
public InteractiveBrowserBrokerCredentialBuilder configuration(com.azure.core.util.Configuration configuration) - Overrides:
configurationin classCredentialBuilderBase<InteractiveBrowserCredentialBuilder>
-
authorityHost
- Overrides:
authorityHostin classAadCredentialBuilderBase<InteractiveBrowserCredentialBuilder>
-
disableAutomaticAuthentication
- Overrides:
disableAutomaticAuthenticationin classInteractiveBrowserCredentialBuilder
-
disableInstanceDiscovery
- Overrides:
disableInstanceDiscoveryin classAadCredentialBuilderBase<InteractiveBrowserCredentialBuilder>
-
enableAccountIdentifierLogging
- Overrides:
enableAccountIdentifierLoggingin classCredentialBuilderBase<InteractiveBrowserCredentialBuilder>
-
enableUnsafeSupportLogging
- Overrides:
enableUnsafeSupportLoggingin classAadCredentialBuilderBase<InteractiveBrowserCredentialBuilder>
-
executorService
- Overrides:
executorServicein classAadCredentialBuilderBase<InteractiveBrowserCredentialBuilder>
-
httpClient
- Specified by:
httpClientin interfacecom.azure.core.client.traits.HttpTrait<InteractiveBrowserCredentialBuilder>- Overrides:
httpClientin classCredentialBuilderBase<InteractiveBrowserCredentialBuilder>
-
httpLogOptions
public InteractiveBrowserBrokerCredentialBuilder httpLogOptions(com.azure.core.http.policy.HttpLogOptions logOptions) - Specified by:
httpLogOptionsin interfacecom.azure.core.client.traits.HttpTrait<InteractiveBrowserCredentialBuilder>- Overrides:
httpLogOptionsin classCredentialBuilderBase<InteractiveBrowserCredentialBuilder>
-
loginHint
- Overrides:
loginHintin classInteractiveBrowserCredentialBuilder
-
pipeline
public InteractiveBrowserBrokerCredentialBuilder pipeline(com.azure.core.http.HttpPipeline pipeline) - Specified by:
pipelinein interfacecom.azure.core.client.traits.HttpTrait<InteractiveBrowserCredentialBuilder>- Overrides:
pipelinein classCredentialBuilderBase<InteractiveBrowserCredentialBuilder>
-
maxRetry
- Overrides:
maxRetryin classCredentialBuilderBase<InteractiveBrowserCredentialBuilder>
-
redirectUrl
- Overrides:
redirectUrlin classInteractiveBrowserCredentialBuilder
-
additionallyAllowedTenants
public InteractiveBrowserBrokerCredentialBuilder additionallyAllowedTenants(List<String> additionallyAllowedTenants) - Overrides:
additionallyAllowedTenantsin classInteractiveBrowserCredentialBuilder
-
retryOptions
public InteractiveBrowserBrokerCredentialBuilder retryOptions(com.azure.core.http.policy.RetryOptions retryOptions) - Specified by:
retryOptionsin interfacecom.azure.core.client.traits.HttpTrait<InteractiveBrowserCredentialBuilder>- Overrides:
retryOptionsin classCredentialBuilderBase<InteractiveBrowserCredentialBuilder>
-
retryPolicy
public InteractiveBrowserBrokerCredentialBuilder retryPolicy(com.azure.core.http.policy.RetryPolicy retryPolicy) - Overrides:
retryPolicyin classCredentialBuilderBase<InteractiveBrowserCredentialBuilder>
-
tenantId
- Overrides:
tenantIdin classAadCredentialBuilderBase<InteractiveBrowserCredentialBuilder>
-
retryTimeout
public InteractiveBrowserBrokerCredentialBuilder retryTimeout(Function<Duration, Duration> retryTimeout) - Overrides:
retryTimeoutin classCredentialBuilderBase<InteractiveBrowserCredentialBuilder>
-
tokenCachePersistenceOptions
public InteractiveBrowserBrokerCredentialBuilder tokenCachePersistenceOptions(TokenCachePersistenceOptions tokenCachePersistenceOptions) - Overrides:
tokenCachePersistenceOptionsin classInteractiveBrowserCredentialBuilder
-
httpPipeline
public InteractiveBrowserBrokerCredentialBuilder httpPipeline(com.azure.core.http.HttpPipeline httpPipeline) - Overrides:
httpPipelinein classCredentialBuilderBase<InteractiveBrowserCredentialBuilder>
-
proxyOptions
public InteractiveBrowserBrokerCredentialBuilder proxyOptions(com.azure.core.http.ProxyOptions proxyOptions) - Overrides:
proxyOptionsin classCredentialBuilderBase<InteractiveBrowserCredentialBuilder>
-