@Test(expected = RuntimeException.class) public void noToken() { final Request badRequest = new HttpRequest.Builder(Method.PUT, this.uri, Operation.WRITE).build(); this.keystoneAuth.authenticate(badRequest); }
@Override public AuthenticatedRequest authenticate(final Request request) { final String keystoneToken = checkNotNull(request.getContext().get(Context.X_OG_KEYSTONE_TOKEN)); final AuthenticatedHttpRequest authenticatedRequest = new AuthenticatedHttpRequest(request); authenticatedRequest.addHeader("X-Auth-Token", keystoneToken); return authenticatedRequest; }
KeystoneAuth implements HttpAuth { @Override public AuthenticatedRequest authenticate(final Request request) { final String keystoneToken = checkNotNull(request.getContext().get(Context.X_OG_KEYSTONE_TOKEN)); final AuthenticatedHttpRequest authenticatedRequest = new AuthenticatedHttpRequest(request); authenticatedRequest.addHeader("X-Auth-Token", keystoneToken); return authenticatedRequest; } }
KeystoneAuth implements HttpAuth { @Override public AuthenticatedRequest authenticate(final Request request) { final String keystoneToken = checkNotNull(request.getContext().get(Context.X_OG_KEYSTONE_TOKEN)); final AuthenticatedHttpRequest authenticatedRequest = new AuthenticatedHttpRequest(request); authenticatedRequest.addHeader("X-Auth-Token", keystoneToken); return authenticatedRequest; }  }
KeystoneAuth implements HttpAuth { @Override public AuthenticatedRequest authenticate(final Request request) { final String keystoneToken = checkNotNull(request.getContext().get(Context.X_OG_KEYSTONE_TOKEN)); final AuthenticatedHttpRequest authenticatedRequest = new AuthenticatedHttpRequest(request); authenticatedRequest.addHeader("X-Auth-Token", keystoneToken); return authenticatedRequest; }  @Override AuthenticatedRequest authenticate(final Request request); @Override String toString(); }
KeystoneAuth implements HttpAuth { @Override public AuthenticatedRequest authenticate(final Request request) { final String keystoneToken = checkNotNull(request.getContext().get(Context.X_OG_KEYSTONE_TOKEN)); final AuthenticatedHttpRequest authenticatedRequest = new AuthenticatedHttpRequest(request); authenticatedRequest.addHeader("X-Auth-Token", keystoneToken); return authenticatedRequest; }  @Override AuthenticatedRequest authenticate(final Request request); @Override String toString();  }