IntelliJCredentialBuilder Class
- java.
lang. Object - com.
azure. identity. CredentialBuilderBase<T> - com.
azure. identity. IntelliJCredentialBuilder
- com.
- com.
public class IntelliJCredentialBuilder
extends CredentialBuilderBase<VisualStudioCodeCredentialBuilder>
Fluent credential builder for instantiating a IntelliJCredential.
IntelliJ IDEA is an integrated development environment (IDE) developed by JetBrains, which provides a variety of features to support software development, such as code completion, debugging, and testing. Azure offers Azure Toolkit for IntelliJ plugin for the IntelliJ IDEA development environment. It enables developers to create, test, and deploy Java applications to the Azure cloud platform. In order to use the plugin authentication as a user or service principal against Microsoft Entra ID is required. The IntelliJCredential authenticates in a development environment and acquires a token on behalf of the logged-in account in Azure Toolkit for IntelliJ. It uses the logged in user information on the IntelliJ IDE and uses it to authenticate the application against Microsoft Entra ID.
Sample: Construct IntelliJCredential
The following code sample demonstrates the creation of a IntelliJCredential, using the IntelliJCredentialBuilder to configure it. Once this credential is created, it may be passed into the builder of many of the Azure SDK for Java client builders as the 'credential' parameter.
TokenCredential intelliJCredential = new IntelliJCredentialBuilder().build();
Constructor Summary
Constructor | Description |
---|---|
IntelliJCredentialBuilder() |
Constructs an instance of Intelli |
Method Summary
Modifier and Type | Method and Description |
---|---|
Intelli |
additionallyAllowedTenants(String[] additionallyAllowedTenants)
Specifies tenants in addition to the specified tenant |
Intelli |
additionallyAllowedTenants(List<String> additionallyAllowedTenants)
Specifies tenants in addition to the specified tenant |
Intelli |
build()
Creates a new IntelliJCredential with the current configurations. |
Intelli |
keePassDatabasePath(String databasePath)
Specifies the Kee |
Intelli |
tenantId(String tenantId)
Sets the tenant id of the user to authenticate through the IntelliJCredential. |
Methods inherited from CredentialBuilderBase
Methods inherited from java.lang.Object
Constructor Details
IntelliJCredentialBuilder
public IntelliJCredentialBuilder()
Constructs an instance of IntelliJCredentialBuilder.
Method Details
additionallyAllowedTenants
public IntelliJCredentialBuilder additionallyAllowedTenants(String[] additionallyAllowedTenants)
Specifies tenants in addition to the specified tenantId for which the credential may acquire tokens. Add the wildcard value "*" to allow the credential to acquire tokens for any tenant the logged in account can access. If no value is specified for tenantId this option will have no effect, and the credential will acquire tokens for any requested tenant.
Parameters:
Returns:
additionallyAllowedTenants
public IntelliJCredentialBuilder additionallyAllowedTenants(List
Specifies tenants in addition to the specified tenantId for which the credential may acquire tokens. Add the wildcard value "*" to allow the credential to acquire tokens for any tenant the logged in account can access. If no value is specified for tenantId this option will have no effect, and the credential will acquire tokens for any requested tenant.
Parameters:
Returns:
build
public IntelliJCredential build()
Creates a new IntelliJCredential with the current configurations.
Returns:
keePassDatabasePath
public IntelliJCredentialBuilder keePassDatabasePath(String databasePath)
Specifies the KeePass database path to read the cached credentials of Azure toolkit for IntelliJ plugin. The databasePath
is required on Windows platform. For macOS and Linux platform native key chain / key ring will be accessed respectively to retrieve the cached credentials.
This path can be located in the IntelliJ IDE. Windows: File -> Settings -> Appearance & Behavior -> System Settings -> Passwords.
Parameters:
Returns:
tenantId
public IntelliJCredentialBuilder tenantId(String tenantId)
Sets the tenant id of the user to authenticate through the IntelliJCredential. The default is the tenant the user originally authenticated to via the Azure Toolkit for IntelliJ plugin.
Parameters:
Returns: