Class DeviceCodeAccount
- java.lang.Object
-
- com.microsoft.azure.toolkit.lib.auth.Account
-
- com.microsoft.azure.toolkit.lib.auth.core.devicecode.DeviceCodeAccount
-
- All Implemented Interfaces:
com.microsoft.azure.toolkit.lib.account.IAccount
public class DeviceCodeAccount extends Account
-
-
Field Summary
Fields Modifier and Type Field Description private CompletableFuture<com.azure.identity.DeviceCodeInfo>deviceCodeFutureprivate ExecutorServiceexecutorServiceprivate reactor.core.publisher.Mono<Account>loginMonoprivate static ThreadFactorynamedThreadFactory-
Fields inherited from class com.microsoft.azure.toolkit.lib.auth.Account
credentialManager, enablePersistence, entity, TOOLKIT_TOKEN_CACHE_NAME
-
-
Constructor Summary
Constructors Constructor Description DeviceCodeAccount()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<Boolean>checkAvailable()reactor.core.publisher.Mono<Account>continueLogin()private com.azure.core.credential.TokenCredentialcreateCredential(com.azure.core.management.AzureEnvironment env)private static ExecutorServicecreateExecutorService()protected reactor.core.publisher.Mono<TokenCredentialManager>createTokenCredentialManager()AuthTypegetAuthType()StringgetClientId()com.azure.identity.DeviceCodeInfogetDeviceCode()protected reactor.core.publisher.Mono<Account>login()protected reactor.core.publisher.Mono<Boolean>preLoginCheck()-
Methods inherited from class com.microsoft.azure.toolkit.lib.auth.Account
getEnvironment, getSelectedSubscriptions, getSubscription, getSubscriptions, getTokenCredential, getTokenCredentialForTenant, getTokenCredentialForTenantV1, getTokenCredentialV1, logout, portalUrl, reloadSubscriptions, selectSubscription, toString
-
-
-
-
Field Detail
-
namedThreadFactory
private static final ThreadFactory namedThreadFactory
-
executorService
private final ExecutorService executorService
-
deviceCodeFuture
private final CompletableFuture<com.azure.identity.DeviceCodeInfo> deviceCodeFuture
-
loginMono
private reactor.core.publisher.Mono<Account> loginMono
-
-
Method Detail
-
getAuthType
public AuthType getAuthType()
- Specified by:
getAuthTypein classAccount
-
getClientId
public String getClientId()
- Specified by:
getClientIdin classAccount
-
preLoginCheck
protected reactor.core.publisher.Mono<Boolean> preLoginCheck()
- Specified by:
preLoginCheckin classAccount
-
checkAvailable
public reactor.core.publisher.Mono<Boolean> checkAvailable()
- Overrides:
checkAvailablein classAccount
-
createTokenCredentialManager
protected reactor.core.publisher.Mono<TokenCredentialManager> createTokenCredentialManager()
- Specified by:
createTokenCredentialManagerin classAccount
-
continueLogin
public reactor.core.publisher.Mono<Account> continueLogin()
- Overrides:
continueLoginin classAccount
-
getDeviceCode
public com.azure.identity.DeviceCodeInfo getDeviceCode()
-
createCredential
private com.azure.core.credential.TokenCredential createCredential(com.azure.core.management.AzureEnvironment env)
-
createExecutorService
private static ExecutorService createExecutorService()
-
-