Class AbstractEncryptionConfiguration

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected com.nimbusds.jose.JWEAlgorithm algorithm  
      protected com.nimbusds.jose.EncryptionMethod method  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract com.nimbusds.jose.JWEDecrypter buildDecrypter()
      Build the appropriate decrypter.
      protected abstract com.nimbusds.jose.JWEEncrypter buildEncrypter()
      Build the appropriate encrypter.
      void decrypt​(com.nimbusds.jwt.EncryptedJWT encryptedJWT)
      Decrypt an encrypted JWT.
      java.lang.String encrypt​(com.nimbusds.jwt.JWT jwt)
      Encrypt a JWT.
      com.nimbusds.jose.JWEAlgorithm getAlgorithm()
      algorithm Getter.
      com.nimbusds.jose.EncryptionMethod getMethod()
      method Getter.
      void setAlgorithm​(com.nimbusds.jose.JWEAlgorithm algorithm)
      algorithm Setter.
      void setMethod​(com.nimbusds.jose.EncryptionMethod method)
      method Setter.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • algorithm

        protected com.nimbusds.jose.JWEAlgorithm algorithm
      • method

        protected com.nimbusds.jose.EncryptionMethod method
    • Constructor Detail

      • AbstractEncryptionConfiguration

        public AbstractEncryptionConfiguration()
    • Method Detail

      • encrypt

        public java.lang.String encrypt​(com.nimbusds.jwt.JWT jwt)
                                 throws com.nimbusds.jose.JOSEException,
                                        java.text.ParseException
        Description copied from interface: EncryptionConfiguration
        Encrypt a JWT.
        Specified by:
        encrypt in interface EncryptionConfiguration
        Parameters:
        jwt - the JWT
        Returns:
        the encrypted JWT
        Throws:
        com.nimbusds.jose.JOSEException - exception when encrypting JWT
        java.text.ParseException - exception when encrypting JWT
      • buildEncrypter

        protected abstract com.nimbusds.jose.JWEEncrypter buildEncrypter()
                                                                  throws com.nimbusds.jose.JOSEException
        Build the appropriate encrypter.
        Returns:
        the appropriate encrypter
        Throws:
        com.nimbusds.jose.JOSEException - could be thrown while building encrypter if configuration is invalid
      • decrypt

        public void decrypt​(com.nimbusds.jwt.EncryptedJWT encryptedJWT)
                     throws com.nimbusds.jose.JOSEException
        Description copied from interface: EncryptionConfiguration
        Decrypt an encrypted JWT.
        Specified by:
        decrypt in interface EncryptionConfiguration
        Parameters:
        encryptedJWT - the encrypted JWT
        Throws:
        com.nimbusds.jose.JOSEException - exception when decrypting the JWT
      • buildDecrypter

        protected abstract com.nimbusds.jose.JWEDecrypter buildDecrypter()
                                                                  throws com.nimbusds.jose.JOSEException
        Build the appropriate decrypter.
        Returns:
        the appropriate decrypter
        Throws:
        com.nimbusds.jose.JOSEException - could be thrown while building decrypter if configuration is invalid
      • getAlgorithm

        public com.nimbusds.jose.JWEAlgorithm getAlgorithm()
        algorithm Getter.
        Returns:
        Instance of JWEAlgorithm
      • setAlgorithm

        public void setAlgorithm​(com.nimbusds.jose.JWEAlgorithm algorithm)
        algorithm Setter.
        Parameters:
        algorithm - Instance of JWEAlgorithm
      • getMethod

        public com.nimbusds.jose.EncryptionMethod getMethod()
        method Getter.
        Returns:
        Instance of EncryptionMethod
      • setMethod

        public void setMethod​(com.nimbusds.jose.EncryptionMethod method)
        method Setter.
        Parameters:
        method - Instance of EncryptionMethod