Class AbstractSignJWTAction

    • Field Detail

      • log

        @Nonnull
        private org.slf4j.Logger log
        Class logger.
      • typeHeader

        @Nullable
        @NotEmpty
        private String typeHeader
        "typ" header to insert while signing.
      • credential

        @Nullable
        private Credential credential
        resolved credential.
    • Constructor Detail

      • AbstractSignJWTAction

        public AbstractSignJWTAction()
    • Method Detail

      • setTypeHeader

        public void setTypeHeader​(@Nullable @NotEmpty
                                  String type)
        Sets the value to be inserted as a "typ" header for the JWS.
        Parameters:
        type - header value
        Since:
        3.1.0
      • getSigner

        private com.nimbusds.jose.JWSSigner getSigner​(com.nimbusds.jose.Algorithm jwsAlgorithm)
                                               throws com.nimbusds.jose.JOSEException
        Returns correct implementation of signer based on algorithm type.
        Parameters:
        jwsAlgorithm - JWS algorithm
        Returns:
        signer for algorithm and private key
        Throws:
        com.nimbusds.jose.JOSEException - if algorithm cannot be supported
      • resolveAlgorithm

        protected com.nimbusds.jose.JWSAlgorithm resolveAlgorithm()
        Resolves JWS algorithm from signature signing parameters.
        Returns:
        JWS algorithm
      • setSignedJWT

        protected abstract void setSignedJWT​(@Nullable
                                             com.nimbusds.jwt.SignedJWT jwt)
        Called with signed JWT as parameter.
        Parameters:
        jwt - signed JWT.
      • getClaimsSetToSign

        @Nonnull
        protected abstract com.nimbusds.jwt.JWTClaimsSet getClaimsSetToSign()
        Called to get claim set to sign.
        Returns:
        claim set to sign