Class JwkTransformerFunction.DefaultKeyIdFunction

java.lang.Object
se.swedenconnect.security.credential.nimbus.JwkTransformerFunction.DefaultKeyIdFunction
All Implemented Interfaces:
Function<PkiCredential, String>
Enclosing class:
JwkTransformerFunction

public static class JwkTransformerFunction.DefaultKeyIdFunction extends Object implements Function<PkiCredential, String>
Default implementation of the function that returns the key id (JWT kid property).
Author:
Martin Lindström
  • Constructor Details

    • DefaultKeyIdFunction

      public DefaultKeyIdFunction()
  • Method Details

    • apply

      @Nullable public String apply(@Nonnull PkiCredential credential)
      If the credential metadata contains a key-id, this is used, otherwise the function attempts to calculate the RFC 7638 thumbprint, and finally the serial number of the certificate is used for key id-calculation.
      Specified by:
      apply in interface Function<PkiCredential, String>