@Override public Identity identity() throws IOException { final List<String> headers = this.resource.httpHeaders() .getRequestHeader(HttpHeaders.AUTHORIZATION); Identity identity = Identity.ANONYMOUS; if (headers != null && !headers.isEmpty()) { identity = this.parse(headers.get(0)); } return identity; }