Skip to content

Instantly share code, notes, and snippets.

@skiph
Created October 24, 2017 07:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skiph/c2bb7d0114b3aa4a2e98b60fff1b22a4 to your computer and use it in GitHub Desktop.
Save skiph/c2bb7d0114b3aa4a2e98b60fff1b22a4 to your computer and use it in GitHub Desktop.
public void notifyUserAgentResponse(Intent data, int returnCode) {
if (returnCode != app.RC_AUTH) {
failLogin(new AuthException("User authorization was cancelled"));
return;
}
AuthorizationResponse resp = AuthorizationResponse.fromIntent(data);
AuthorizationException ex = AuthorizationException.fromIntent(data);
if (resp == null) {
failLogin(new AuthException("User authorization failed"));
return;
} else {
authState.update(resp, ex);
finishUserAuth();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment