Interface UserAuthorizationRepository


public interface UserAuthorizationRepository
Port that removes the stored authorizations (and so the tokens) of users.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    deleteAbandoned(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.
    int
    Deletes every authorization granted to a user.
    int
    Deletes the authorizations whose every token has expired.
  • Method Details

    • deleteByPrincipalName

      int deleteByPrincipalName(String principalName)
      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

      int deleteExpired(Instant now)
      Deletes the authorizations whose every token has expired.
      Parameters:
      now - current instant.
      Returns:
      the number of deleted authorizations.
    • deleteAbandoned

      int deleteAbandoned(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.
      Parameters:
      createdBefore - instant before which an abandoned authorization is deleted.
      Returns:
      the number of deleted authorizations.