AzurePipelinesCredential Class
- java.
lang. Object - com.
azure. identity. AzurePipelinesCredential
- com.
Implements
public class AzurePipelinesCredential
implements TokenCredential
The AzurePipelinesCredential acquires a token using the Azure Pipelines service connection. To construct an instance of this credential, use the AzurePipelinesCredentialBuilder:
// serviceConnectionId is retrieved from the portal.
// systemAccessToken is retrieved from the pipeline environment as shown.
// You may choose another name for this variable.
String systemAccessToken = System.getenv("SYSTEM_ACCESSTOKEN");
AzurePipelinesCredential credential = new AzurePipelinesCredentialBuilder().clientId(clientId)
.tenantId(tenantId)
.serviceConnectionId(serviceConnectionId)
.systemAccessToken(systemAccessToken)
.build();
Method Summary
Modifier and Type | Method and Description |
---|---|
Mono<Access |
getToken(TokenRequestContext request) |
Access |
getTokenSync(TokenRequestContext request) |
Methods inherited from java.lang.Object
Method Details
getToken
public Mono
Parameters:
request
getTokenSync
public AccessToken getTokenSync(TokenRequestContext request)
Parameters:
request
Applies to
Colaborar con nosotros en GitHub
El origen de este contenido se puede encontrar en GitHub, donde también puede crear y revisar problemas y solicitudes de incorporación de cambios. Para más información, consulte nuestra guía para colaboradores.
Azure SDK for Java