EnterpriseChannelValidation Class

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

public final class EnterpriseChannelValidation

Enterprise channel auth validation.

Method Summary

Modifier and Type Method and Description
static java.util.concurrent.CompletableFuture<ClaimsIdentity> authenticateToken(String authHeader, CredentialProvider credentials, ChannelProvider channelProvider, String serviceUrl, String channelId)

Validate the incoming Auth Header as a token sent from a Bot Framework Channel Service.

static java.util.concurrent.CompletableFuture<ClaimsIdentity> authenticateToken(String authHeader, CredentialProvider credentials, ChannelProvider channelProvider, String serviceUrl, String channelId, AuthenticationConfiguration authConfig)

Validate the incoming Auth Header as a token sent from a Bot Framework Channel Service.

static java.util.concurrent.CompletableFuture<ClaimsIdentity> validateIdentity(ClaimsIdentity identity, CredentialProvider credentials, String serviceUrl)

Validates a ClaimsIdentity.

Methods inherited from 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

Method Details

authenticateToken

public static CompletableFuture authenticateToken(String authHeader, CredentialProvider credentials, ChannelProvider channelProvider, String serviceUrl, String channelId)

Validate the incoming Auth Header as a token sent from a Bot Framework Channel Service.

Parameters:

authHeader - The raw HTTP header in the format: "Bearer [longString]".
credentials - The user defined set of valid credentials, such as the AppId.
channelProvider - The channelService value that distinguishes public Azure from US Government Azure.
serviceUrl - The service url from the request.
channelId - The ID of the channel to validate.

Returns:

A valid ClaimsIdentity.
     On join:

authenticateToken

public static CompletableFuture authenticateToken(String authHeader, CredentialProvider credentials, ChannelProvider channelProvider, String serviceUrl, String channelId, AuthenticationConfiguration authConfig)

Validate the incoming Auth Header as a token sent from a Bot Framework Channel Service.

Parameters:

authHeader - The raw HTTP header in the format: "Bearer [longString]".
credentials - The user defined set of valid credentials, such as the AppId.
channelProvider - The channelService value that distinguishes public Azure from US Government Azure.
serviceUrl - The service url from the request.
channelId - The ID of the channel to validate.
authConfig - The authentication configuration.

Returns:

A valid ClaimsIdentity.

validateIdentity

public static CompletableFuture validateIdentity(ClaimsIdentity identity, CredentialProvider credentials, String serviceUrl)

Validates a ClaimsIdentity.

Parameters:

identity - The ClaimsIdentity to validate.
credentials - The user defined set of valid credentials, such as the AppId.
serviceUrl - The service url from the request.

Returns:

A valid ClaimsIdentity.
     On join:

Applies to