[webexteams] Remove the access token when the thing is removed (#14979)
Related to #14818 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
14e7109a25
commit
88413c001d
|
@ -147,11 +147,17 @@ public class WebexTeamsHandler extends BaseThingHandler implements AccessTokenRe
|
|||
OAuthClientService authService = this.authService;
|
||||
if (authService != null) {
|
||||
authService.removeAccessTokenRefreshListener(this);
|
||||
}
|
||||
oAuthFactory.ungetOAuthService(thing.getUID().getAsString());
|
||||
}
|
||||
cancelSchedulers();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleRemoval() {
|
||||
oAuthFactory.deleteServiceAndAccessToken(thing.getUID().getAsString());
|
||||
super.handleRemoval();
|
||||
}
|
||||
|
||||
private void createIntegrationOAuthClientService(WebexTeamsConfiguration config) {
|
||||
String thingUID = this.getThing().getUID().getAsString();
|
||||
logger.debug("Creating OAuth Client Service for {}", thingUID);
|
||||
|
|
Loading…
Reference in New Issue