Class KeyWrapper


  • public class KeyWrapper
    extends Object
    • Constructor Detail

      • KeyWrapper

        public KeyWrapper()
    • Method Detail

      • getProviderId

        public String getProviderId()
      • setProviderId

        public void setProviderId​(String providerId)
      • getProviderPriority

        public long getProviderPriority()
      • setProviderPriority

        public void setProviderPriority​(long providerPriority)
      • getKid

        public String getKid()
      • setKid

        public void setKid​(String kid)
      • getAlgorithm

        public String getAlgorithm()

        Returns the value of the optional alg claim.

        Returns:
        the algorithm value
      • getAlgorithmOrDefault

        public String getAlgorithmOrDefault()

        Returns the value of the optional alg claim. If not defined, a default is returned depending on the key type as per kty claim.

        For keys of type KeyType.RSA, the default algorithm is Algorithm.RS256 as this is the default algorithm recommended by OIDC specs.

        Returns:
        the algorithm set or a default based on the key type.
      • setAlgorithm

        public void setAlgorithm​(String algorithm)
      • getType

        public String getType()
      • setType

        public void setType​(String type)
      • getUse

        public KeyUse getUse()
      • setUse

        public void setUse​(KeyUse use)
      • setStatus

        public void setStatus​(KeyStatus status)
      • getSecretKey

        public SecretKey getSecretKey()
      • setSecretKey

        public void setSecretKey​(SecretKey secretKey)
      • getPrivateKey

        public Key getPrivateKey()
      • setPrivateKey

        public void setPrivateKey​(Key privateKey)
      • getPublicKey

        public Key getPublicKey()
      • setPublicKey

        public void setPublicKey​(Key publicKey)
      • setCertificate

        public void setCertificate​(X509Certificate certificate)
      • setCertificateChain

        public void setCertificateChain​(List<X509Certificate> certificateChain)