Interface UserAuthorizationRepository
public interface UserAuthorizationRepository
Port that removes the stored authorizations (and so the tokens) of users.
-
Method Summary
Modifier and TypeMethodDescriptionintdeleteAbandoned(Instant createdBefore) Deletes the abandoned authorizations: those that never got any token (an authorization or consent request the user never completed) and were created before an instant.intdeleteByPrincipalName(String principalName) Deletes every authorization granted to a user.intdeleteExpired(Instant now) Deletes the authorizations whose every token has expired.
-
Method Details
-
deleteByPrincipalName
Deletes every authorization granted to a user.- Parameters:
principalName- name of the user the authorizations were granted to.- Returns:
- the number of deleted authorizations.
-
deleteExpired
Deletes the authorizations whose every token has expired.- Parameters:
now- current instant.- Returns:
- the number of deleted authorizations.
-
deleteAbandoned
Deletes the abandoned authorizations: those that never got any token (an authorization or consent request the user never completed) and were created before an instant.- Parameters:
createdBefore- instant before which an abandoned authorization is deleted.- Returns:
- the number of deleted authorizations.
-