logoutToken static method
Keycloak compatible logout see https://www.keycloak.org/docs/latest/securing_apps/#logout-endpoint
Implementation
static Future<void> logoutToken({required LogoutTokenRequest request}) async {
if (request.configuration.endSessionEndpoint == null) return;
final url = Uri.parse(request.configuration.endSessionEndpoint!);
try {
await httpRetry(
() => http.post(url, body: request.toMap()),
);
} on HttpResponseException catch (e) {
throw LogoutException(e.toString());
}
}