// header:
String[] credentials = HttpBasicHelper.extractUsernameAndPasswordFromBasicHeader(request);
String variantID = credentials[0];
String secret = credentials[1];
final Variant variant = genericVariantService.findByVariantID(variantID);
if (variant != null && variant.getSecret().equals(secret)) {
return variant;
}
// unauthorized...
return null;