Class SigningKeyAdminController

java.lang.Object
com.irurueta.authserver.authorization.api.web.keys.SigningKeyAdminController
All Implemented Interfaces:
SigningKeysApi

@RestController public class SigningKeyAdminController extends Object implements SigningKeysApi
Administration of the signing keys, as the contract apis/auth-server/rest-server/auth-server-api-v1.yaml describes it through the generated SigningKeysApi. Only the public half of each key is ever returned.
  • Field Details

    • listSigningKeysUseCase

      private final ListSigningKeysUseCase listSigningKeysUseCase
      Lists the keys.
    • signingKeyRotator

      private final SigningKeyRotator signingKeyRotator
      Rotates the keys.
    • signingKeyDtoMapper

      private final SigningKeyDtoMapper signingKeyDtoMapper
      Maps the keys onto the generated DTO.
  • Constructor Details

    • SigningKeyAdminController

      public SigningKeyAdminController()
  • Method Details

    • listSigningKeys

      public org.springframework.http.ResponseEntity<List<SigningKeyResponse>> listSigningKeys()
      Lists the keys.
      Specified by:
      listSigningKeys in interface SigningKeysApi
      Returns:
      every key, without its private half.
    • rotateSigningKeys

      public org.springframework.http.ResponseEntity<List<SigningKeyResponse>> rotateSigningKeys()
      Rotates the keys now, whatever the age of the active key.
      Specified by:
      rotateSigningKeys in interface SigningKeysApi
      Returns:
      the keys after the rotation, without their private half.