-
Notifications
You must be signed in to change notification settings - Fork 147
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
Delete keys and stored Credentials on unrecoverable use cases #218
Changes from all commits
607cb38
812a9e2
bb59b13
c6001da
d878ec0
af1fbe5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,14 @@ public class CredentialsManagerException extends Auth0Exception { | |
CredentialsManagerException(String message) { | ||
super(message); | ||
} | ||
|
||
/** | ||
* Returns true when this Android device doesn't support the cryptographic algorithms used | ||
* to handle encryption and decryption, false otherwise. | ||
* | ||
* @return whether this device is compatible with {@link SecureCredentialsManager} or not. | ||
*/ | ||
public boolean isDeviceIncompatible() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why have a method that checks for the negative outcome? Why not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thought about that but discarded it. The thing is this is already an exception (something that went wrong). The "catastrophic" reason of the error could be a It wouldn't make sense to receive this exception and check "is device compatible" IMO. Maybe we could rename this method (not the exception class) to |
||
return (getCause() instanceof IncompatibleDeviceException); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When users receive a
CredentialsManagerException
after calling "save" or "get" credentials methods, they can check whether the exception is recoverable or not by checking thisisDeviceIncompatible
flag.