// extract the pushApplicationID and its secret from the HTTP Basic header:
String[] credentials = HttpBasicHelper.extractUsernameAndPasswordFromBasicHeader(request);
String pushApplicationID = credentials[0];
String secret = credentials[1];
final PushApplication pushApplication = pushApplicationService.findByPushApplicationID(pushApplicationID);
if (pushApplication != null && pushApplication.getMasterSecret().equals(secret)) {
return pushApplication;
}
// unauthorized...
return null;