Class PublishedSigningKeysUseCase

java.lang.Object
com.irurueta.authserver.authorization.application.keys.PublishedSigningKeysUseCase

@Service @Transactional(readOnly=true) public class PublishedSigningKeysUseCase extends Object
Use case that finds the keys to publish in the JWKS: the active key, the next key (so relying parties can cache it before it signs) and every retired key whose tokens may still be unexpired.
  • Field Details

    • signingKeyRepository

      private final SigningKeyRepository signingKeyRepository
      Port that stores the keys.
    • clock

      private final Clock clock
      Source of the current time.
    • signingKeyRetention

      private final SigningKeyRetention signingKeyRetention
      Decides how long a retired key stays published.
  • Constructor Details

    • PublishedSigningKeysUseCase

      public PublishedSigningKeysUseCase()
  • Method Details

    • execute

      public List<SigningKey> execute()
      Finds the keys to publish.
      Returns:
      the active, next and still-valid retired keys.