use of org.keycloak.models.TokenRevocationStoreProvider in project keycloak by keycloak.
the class TokenRevocationEndpoint method revokeAccessToken.
private void revokeAccessToken() {
TokenRevocationStoreProvider revocationStore = session.getProvider(TokenRevocationStoreProvider.class);
int currentTime = Time.currentTime();
long lifespanInSecs = Math.max(token.getExp() - currentTime, 10);
revocationStore.putRevokedToken(token.getId(), lifespanInSecs);
}
Aggregations