Package org.keycloak.keys
Class KeyNoteUtils
java.lang.Object
org.keycloak.keys.KeyNoteUtils
- Author:
- rmartinc
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
attachKeyNotes
(ComponentModel model, String name, KeyWrapper key) Creates two notes in the model to save the key in the cached model.static KeyWrapper
retrieveKeyFromNotes
(ComponentModel model, String name) Retrieves the key from the note in the model if available.
-
Method Details
-
attachKeyNotes
Creates two notes in the model to save the key in the cached model. The first note name is the key itself. The second note is the date the certificate expires name.notAfter, if there is a certificate defined in the key (second note can be missing).- Parameters:
model
- The model component to attach the notesname
- The name of the notekey
- The key to attach
-
retrieveKeyFromNotes
Retrieves the key from the note in the model if available. The second key for expiration date is also checked to see if the certificate is expired. If expired the key is transformed into passive.- Parameters:
model
- The model with the keysname
- The name of the key- Returns:
- The attached key or null
-