Created
April 29, 2016 01:21
-
-
Save DDRBoxman/2dbc4d38d4ae747a7a21c12e057e3e0d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SigningClient implements Client { | |
final Client wrapped; | |
public SigningClient(Client client) { | |
wrapped = client; | |
} | |
@Override public Response execute(Request request) { | |
Request newRequest = sign(request); | |
return wrapped.execute(newRequest); | |
} | |
private void sign(Request request) { | |
//make signpost sign the request here | |
// aka add the oauth 2 authentication header | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment