MessageBytes authorization =
request.getCoyoteRequest().getMimeHeaders().getValue("authorization");
if (authorization != null) {
authorization.toBytes();
ByteChunk authorizationBC = authorization.getByteChunk();
if (authorizationBC.startsWithIgnoreCase("basic ", 0)) {
return bc.authenticate(request, response, config);
}
else if (authorizationBC.startsWithIgnoreCase("oauth ", 0)) {
return authenticateOAuth(request, response, config);
}