Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check that requested tokens are present on the result. #330

Merged
merged 2 commits into from
Aug 22, 2016

Conversation

lbalmaceda
Copy link
Contributor

  • Remove localized error message when Authentication fails. This was used when calling AuthenticationCallback with a LockException.
  • Check for requested scopes, and validate that the Credentials received contains them.
  • Fail with callback.onError(LockException) when a requested token is missing from the response, even if the response was successful.

@lbalmaceda lbalmaceda added this to the 2.0.0-beta.4 milestone Aug 18, 2016
@@ -162,7 +163,11 @@ private void processEvent(Intent data) {
switch (action) {
case Constants.AUTHENTICATION_ACTION:
Log.v(TAG, "AUTHENTICATION action received in our BroadcastReceiver");
callback.onEvent(LockEvent.AUTHENTICATION, data);
if (data.getExtras().containsKey("error")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Constants.ERROR_EXTRA ?

@hzalaz hzalaz force-pushed the improve-lock-errors branch from 1252d0e to f35208e Compare August 22, 2016 19:32
@hzalaz hzalaz merged commit 11b74ed into v2 Aug 22, 2016
@hzalaz hzalaz deleted the improve-lock-errors branch August 22, 2016 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants