public static boolean isIntendedForAudience(String audienceName,JwtClaimsSet jwtClaims) throws AuthLoginException {
  List<String> jwtAudiences=jwtClaims.getAudience();
  return jwtAudiences.contains(audienceName);
}

public static boolean isIntendedForAudience ( String audienceName , JwtClaimsSet jwtClaims ) throws AuthLoginException { List < String > jwtAudiences = jwtClaims . getAudience ( ) ; return jwtAudiences . contains ( audienceName ) ; }
check whether or not the token is designated for the specified audience .
