I am working on a Java project which has Evernote services integrated into it through an app created on Evernote. Currently, everything is working fine except for access-revocation.
When an user who has already authorized the app, at some point decides not to give this app any access, I would like to also de-authorize the app from the users evernote account.
For this, I am searching for some sample, but came empty handed. One link I found was this, where it was required to call that method with UserStore. I have the access-token, but unfortunately I am only working with NoteStoreClient, rather than UserStore.
Here is the revocation code I have so far.
Person person = this.personService.getCurrentlyAuthenticatedUser();
if (!(person == null)) {
if (person.isEvernoteConsumed()) {
try {
this.evernoteDAO.deleteEvernoteForUser(person.getId());
Evernote evernote = getUsersEvernote(person.getId());
EvernoteAuth evernoteAuth = new EvernoteAuth(EVERNOTE_SERVICE, evernote.getAccessToken());
NoteStoreClient noteStoreClient = new ClientFactory(evernoteAuth).createNoteStoreClient();
}catch (Exception e){
e.printStackTrace();
}
}
}
Nothing fancy in that code, I know. If anyone has any idea of revocation from Evernote, kindly let me know. Thank you.