AppCredentials Classe

  • java.lang.Object
    • com.microsoft.bot.connector.authentication.AppCredentials

Implémente

public abstract class AppCredentials
implements ServiceClientCredentials

Abstraction de base pour les informations d’identification AAD pour l’authentification et la mise en cache.

Les sous-classes doivent fournir l’impl pour #buildAuthenticator

Récapitulatif du constructeur

Constructeur Description
AppCredentials(String withChannelAuthTenant)

Initialise une nouvelle instance de la classe AppCredentials.

AppCredentials(String withChannelAuthTenant, String withOAuthScope)

Initialise une nouvelle instance de la classe AppCredentials.

Résumé de la méthode

Modificateur et type Méthode et description
void applyCredentialsFilter(OkHttpClient.Builder clientBuilder)

Appliquez les informations d’identification à la requête HTTP.

protected abstract Authenticator buildAuthenticator()

Retourne un authentificateur approprié fourni par une sous-classe.

java.lang.String getAppId()

Obtient l’ID d’application pour ces informations d’identification.

protected java.lang.String getAuthTenant()

Obtient le locataire de jeton d’authentification du canal pour ces informations d’identification.

java.lang.String getChannelAuthTenant()

Obtient le locataire à utiliser pour l’authentification par canal.

java.util.concurrent.CompletableFuture<java.lang.String> getToken()

Obtient un jeton d’accès OAuth.

java.lang.String oAuthEndpoint()

Point de terminaison OAuth à utiliser.

java.lang.String oAuthScope()

Étendue OAuth à utiliser.

void setAppId(String withAppId)

Définit l’ID d’application Microsoft pour ces informations d’identification.

protected void setAuthTenant(String withAuthTenant)

Définit le locataire du jeton d’authentification du canal pour ces informations d’identification.

void setChannelAuthTenant(String withAuthTenant)

Définit le locataire à utiliser pour l’authentification par canal.

Méthodes héritées de java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Détails du constructeur

AppCredentials

public AppCredentials(String withChannelAuthTenant)

Initialise une nouvelle instance de la classe AppCredentials.

Paramètres:

withChannelAuthTenant - Optionnel. Locataire de jeton oauth.

AppCredentials

public AppCredentials(String withChannelAuthTenant, String withOAuthScope)

Initialise une nouvelle instance de la classe AppCredentials.

Paramètres:

withChannelAuthTenant - Optionnel. Locataire de jeton oauth.
withOAuthScope - Étendue du jeton.

Détails de la méthode

applyCredentialsFilter

public void applyCredentialsFilter(OkHttpClient.Builder clientBuilder)

Appliquez les informations d’identification à la requête HTTP.

Remarque : Fournit les mêmes fonctionnalités que dotnet ProcessHttpRequestAsync

Paramètres:

clientBuilder - le constructeur pour la création d’un OkHttpClient

buildAuthenticator

protected abstract Authenticator buildAuthenticator()

Retourne un authentificateur approprié fourni par une sous-classe.

Retours:

Objet Authenticator.

Exception:

java.net.MalformedURLException - Si le point de terminaison n’est pas valide.

getAppId

public String getAppId()

Obtient l’ID d’application pour ces informations d’identification.

Retours:

ID de l’application.

getAuthTenant

protected String getAuthTenant()

Obtient le locataire de jeton d’authentification du canal pour ces informations d’identification.

Retours:

Locataire du jeton d’authentification du canal.

getChannelAuthTenant

public String getChannelAuthTenant()

Obtient le locataire à utiliser pour l’authentification par canal.

Retours:

Locataire à utiliser pour l’authentification par canal.

getToken

public CompletableFuture getToken()

Obtient un jeton d’accès OAuth.

Retours:

Si la tâche réussit, le résultat contient la chaîne de jeton d’accès.

oAuthEndpoint

public String oAuthEndpoint()

Point de terminaison OAuth à utiliser.

Retours:

Point de terminaison OAuth.

oAuthScope

public String oAuthScope()

Étendue OAuth à utiliser.

Retours:

Étendue OAuth.

setAppId

public void setAppId(String withAppId)

Définit l’ID d’application Microsoft pour ces informations d’identification.

Paramètres:

withAppId - ID de l’application.

setAuthTenant

protected void setAuthTenant(String withAuthTenant)

Définit le locataire du jeton d’authentification du canal pour ces informations d’identification.

Paramètres:

withAuthTenant - Locataire du jeton d’authentification.

setChannelAuthTenant

public void setChannelAuthTenant(String withAuthTenant)

Définit le locataire à utiliser pour l’authentification par canal.

Paramètres:

withAuthTenant - Locataire à utiliser pour l’authentification par canal.

S’applique à