Class AuthenticatedEncryptionCryptographyHandler

    • Constructor Detail

      • AuthenticatedEncryptionCryptographyHandler

        public AuthenticatedEncryptionCryptographyHandler()
    • Method Detail

      • buildJwt

        public String buildJwt​(JwtBuilderFactory jwtBuilderFactory,
                               JwtClaimsSet claimsSet)
        Description copied from interface: JwtCryptographyHandler
        Builds a JWT with the given claims set. The resulting JWT will be both encrypted and authenticated, either through direct authenticated encryption or a combination of encryption and signing.
        Specified by:
        buildJwt in interface JwtCryptographyHandler
        Parameters:
        jwtBuilderFactory - the JWT builder factory.
        claimsSet - the claims to add to the JWT.
        Returns:
        the JWT in Compact Serialization form.
      • decryptAndVerify

        public Jwt decryptAndVerify​(JwtBuilderFactory jwtBuilderFactory,
                                    String jwt)
        Description copied from interface: JwtCryptographyHandler
        Decrypts and verifies that the JWT is authentic in a single step.
        Specified by:
        decryptAndVerify in interface JwtCryptographyHandler
        Parameters:
        jwtBuilderFactory - The JWT builder factory.
        jwt - the JWT to decrypt and verify.
        Returns:
        the decrypted and verified JWT.