com.microsoft.azure.kusto.data.auth.AsyncCallbackTokenProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kusto-data Show documentation
Show all versions of kusto-data Show documentation
Kusto client library for executing queries and retrieving data
package com.microsoft.azure.kusto.data.auth;
import com.microsoft.azure.kusto.data.exceptions.DataClientException;
import org.jetbrains.annotations.NotNull;
import reactor.core.publisher.Mono;
import java.net.URISyntaxException;
public class AsyncCallbackTokenProvider extends TokenProviderBase {
public static final String CALLBACK_TOKEN_PROVIDER = "CallbackTokenProvider";
private final Mono tokenProvider;
AsyncCallbackTokenProvider(@NotNull String clusterUrl, @NotNull Mono tokenProvider) throws URISyntaxException {
super(clusterUrl, null);
this.tokenProvider = tokenProvider;
}
@Override
protected Mono acquireAccessTokenImpl() {
return tokenProvider.onErrorMap(e -> DataClientException.unwrapThrowable(clusterUrl, e));
}
@Override
protected String getAuthMethod() {
return CALLBACK_TOKEN_PROVIDER;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy