Class PublicKeysWrapper

java.lang.Object
org.keycloak.crypto.PublicKeysWrapper

public class PublicKeysWrapper extends Object
Author:
Marek Posolda
  • Field Details

  • Constructor Details

  • Method Details

    • getKeys

      public List<KeyWrapper> getKeys()
    • getKids

      public List<String> getKids()
    • getKeyByKidAndAlg

      public KeyWrapper getKeyByKidAndAlg(String kid, String alg)
      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 parameter
      alg - rfc7517 alg parameter
      Returns:
      KeyWrapper matching given parameters
    • getKeyByPredicate

      public KeyWrapper getKeyByPredicate(Predicate<KeyWrapper> predicate)
      Returns the first key that matches the predicate.
      Parameters:
      predicate - The predicate
      Returns:
      The first key that matches the predicate or null