mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 23:22:02 +01:00
[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;
|
OAuthClientService authService = this.authService;
|
||||||
if (authService != null) {
|
if (authService != null) {
|
||||||
authService.removeAccessTokenRefreshListener(this);
|
authService.removeAccessTokenRefreshListener(this);
|
||||||
|
oAuthFactory.ungetOAuthService(thing.getUID().getAsString());
|
||||||
}
|
}
|
||||||
oAuthFactory.ungetOAuthService(thing.getUID().getAsString());
|
|
||||||
cancelSchedulers();
|
cancelSchedulers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleRemoval() {
|
||||||
|
oAuthFactory.deleteServiceAndAccessToken(thing.getUID().getAsString());
|
||||||
|
super.handleRemoval();
|
||||||
|
}
|
||||||
|
|
||||||
private void createIntegrationOAuthClientService(WebexTeamsConfiguration config) {
|
private void createIntegrationOAuthClientService(WebexTeamsConfiguration config) {
|
||||||
String thingUID = this.getThing().getUID().getAsString();
|
String thingUID = this.getThing().getUID().getAsString();
|
||||||
logger.debug("Creating OAuth Client Service for {}", thingUID);
|
logger.debug("Creating OAuth Client Service for {}", thingUID);
|
||||||
|
Loading…
Reference in New Issue
Block a user