Created
October 8, 2013 16:07
-
-
Save smiklosovic/6887115 to your computer and use it in GitHub Desktop.
This file contains 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 void retrieveOTPPath(FragmentActivity activity, Callback<List<OTP>> callback) throws Exception { | |
AuthenticationModule authModule = authenticator.get("login", activity); | |
URL url = new URL(baseURL); | |
Pipeline pipeline = new Pipeline(url); | |
PipeConfig pipeConfig = new PipeConfig(url, OTP.class); | |
pipeConfig.setAuthModule(authModule); | |
pipeConfig.setEndpoint("/auth/otp/secret"); | |
Pipe<OTP> pipe = pipeline.pipe(OTP.class, pipeConfig); | |
ReadFilter filter = new ReadFilter(); | |
filter.setLinkUri(new URI("/aerogear-controller-demo/auth/otp/secret")); | |
pipe.read(filter, callback); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment