Skip to content

Commit

Permalink
Delete OAuth2 token when thing is removed
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
  • Loading branch information
jlaur committed May 6, 2023
1 parent da1a95f commit f7af082
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ public void dispose() {
public void handleCommand(ChannelUID channelUID, Command command) {
}

@Override
public void handleRemoval() {
oAuthFactory.deleteServiceAndAccessToken(thing.getUID().getAsString());
super.handleRemoval();
}

@Override
public Collection<Class<? extends ThingHandlerService>> getServices() {
return List.of(IndegoDiscoveryService.class);
Expand Down

0 comments on commit f7af082

Please sign in to comment.