Package org.keycloak.crypto
Class PublicKeysWrapper
java.lang.Object
org.keycloak.crypto.PublicKeysWrapper
- Author:
- Marek Posolda
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPublicKeysWrapper(List<KeyWrapper> keys) PublicKeysWrapper(List<KeyWrapper> keys, Long expirationTime) -
Method Summary
Modifier and TypeMethodDescriptiongetKeyByKidAndAlg(String kid, String alg) Find an appropriate key given a KID and algorithm.getKeyByPredicate(Predicate<KeyWrapper> predicate) Returns the first key that matches the predicate.getKeys()getKids()
-
Field Details
-
EMPTY
-
-
Constructor Details
-
PublicKeysWrapper
-
PublicKeysWrapper
-
-
Method Details
-
getExpirationTime
-
getKeys
-
getKids
-
getKeyByKidAndAlg
Find an appropriate key given a KID and algorithm. Prefer matching on both parameters, but may partially match on KID only. Or if KID is not provided, the algorithm. Will use a flagged default client certificate otherwise, if a match is not found.- Parameters:
kid- rfc7517 KID parameteralg- rfc7517 alg parameter- Returns:
KeyWrappermatching given parameters
-
getKeyByPredicate
Returns the first key that matches the predicate.- Parameters:
predicate- The predicate- Returns:
- The first key that matches the predicate or null
-