JwtTokenValidation Class
- java.
lang. Object - com.
microsoft. bot. connector. authentication. JwtTokenValidation
- com.
public final class JwtTokenValidation
Contains helper methods for authenticating incoming HTTP requests.
Method Summary
Methods inherited from java.lang.Object
Method Details
authenticateRequest
public static CompletableFuture
Authenticates the request and add's the activity's Activity#getServiceUrl() to the set of trusted URLs.
Parameters:
Returns:
authenticateRequest
public static CompletableFuture
Authenticates the request and add's the activity's Activity#getServiceUrl() to the set of trusted URLs.
Parameters:
Returns:
getAppIdFromClaims
public static String getAppIdFromClaims(Map
Gets the AppId from claims.
In v1 tokens the AppId is in the the AppIdClaim claim. In v2 tokens the AppId is in the AuthorizedParty claim.
Parameters:
Returns:
Throws:
isValidTokenFormat
public static boolean isValidTokenFormat(String authHeader)
Internal helper to check if the token has the shape we expect "Bearer [big long string]".
Parameters:
Returns:
validateAuthHeader
public static CompletableFuture
Validates the authentication header of an incoming request.
Parameters:
Returns:
On Call:
validateAuthHeader
public static CompletableFuture
Validates the authentication header of an incoming request.
Parameters:
Returns: