yfiton
yfiton copied to clipboard
Add support for Token revokation
When a Token expires or has been revoked an exception is thrown:
lpellegr@leonard:yfiton[master]$ yfiton -n slack -Pmessage="Quick design session at 2pm" Exception in thread "main" flowctrl.integration.slack.exception.SlackResponseErrorException: token_revoked. check the link https://api.slack.com/methods/chat.postMessage at flowctrl.integration.slack.webapi.SlackWebApiClientImpl.call(SlackWebApiClientImpl.java:1055) at flowctrl.integration.slack.webapi.SlackWebApiClientImpl.call(SlackWebApiClientImpl.java:1003) at flowctrl.integration.slack.webapi.SlackWebApiClientImpl.postMessage(SlackWebApiClientImpl.java:287) at com.yfiton.notifiers.slack.SlackNotifier.notify(SlackNotifier.java:93) at com.yfiton.api.Notifier.handle(Notifier.java:62) at com.yfiton.oauth.OAuthNotifier.handle(OAuthNotifier.java:143) at com.yfiton.core.Yfiton.notify(Yfiton.java:112) at com.yfiton.cli.YfitonCli.main(YfitonCli.java:82)
Instead, an error message should be displayed, an explanation about how to remove the revoked token from the configuration given and maybe a new authentication suggested.