sb.append(token.getTokenKey());
} else if (OAuthConstants.MAC_TOKEN_TYPE.equals(token.getTokenType())) {
if (httpProps == null) {
throw new IllegalArgumentException("MAC scheme requires HTTP Request properties");
}
MacAuthorizationScheme macAuthData = new MacAuthorizationScheme(httpProps, token);
String macAlgo = token.getParameters().get(OAuthConstants.MAC_TOKEN_ALGORITHM);
String macSecret = token.getParameters().get(OAuthConstants.MAC_TOKEN_SECRET);
sb.append(macAuthData.toAuthorizationHeader(macAlgo, macSecret));
} else {
throw new ClientWebApplicationException(new OAuthServiceException("Unsupported token type"));
}
}