Class AbstractOidcClientAuthenticationFlowTest

    • Constructor Detail

      • AbstractOidcClientAuthenticationFlowTest

        public AbstractOidcClientAuthenticationFlowTest​(String flowId)
    • Method Detail

      • populateClientAssertionParams

        protected void populateClientAssertionParams​(Map<String,​String> requestParameters,
                                                     com.nimbusds.jwt.SignedJWT jwt)
      • testInvalidSecretJWT_missingSub

        public void testInvalidSecretJWT_missingSub()
                                             throws Exception
        Throws:
        Exception
      • testInvalidSecretJWT_missingIss

        public void testInvalidSecretJWT_missingIss()
                                             throws Exception
        Throws:
        Exception
      • testInvalidSecretJWT_missingAud

        public void testInvalidSecretJWT_missingAud()
                                             throws Exception
        Throws:
        Exception
      • testInvalidSecretJWT_missingExp

        public void testInvalidSecretJWT_missingExp()
                                             throws Exception
        Throws:
        Exception
      • testInvalidSecretJWT_expiredExp

        public void testInvalidSecretJWT_expiredExp()
                                             throws Exception
        Throws:
        Exception
      • testInvalidSecretJWT_issuedInTheFuture

        public void testInvalidSecretJWT_issuedInTheFuture()
                                                    throws Exception
        Throws:
        Exception
      • testInvalidSecretJWT_missingJti

        public void testInvalidSecretJWT_missingJti()
                                             throws Exception
        Throws:
        Exception
      • testInvalidSecretJWT_replayJti

        public void testInvalidSecretJWT_replayJti()
                                            throws Exception
        Throws:
        Exception
      • testValidSecretJWT

        public void testValidSecretJWT()
                                throws Exception
        Throws:
        Exception
      • testInvalidPrivateKeyJWT_missingSub

        public void testInvalidPrivateKeyJWT_missingSub()
                                                 throws Exception
        Throws:
        Exception
      • testInvalidPrivateKeyJWT_missingIss

        public void testInvalidPrivateKeyJWT_missingIss()
                                                 throws Exception
        Throws:
        Exception
      • testInvalidPrivateKeyJWT_missingAud

        public void testInvalidPrivateKeyJWT_missingAud()
                                                 throws Exception
        Throws:
        Exception
      • testInvalidPrivateKeyJWT_missingExp

        public void testInvalidPrivateKeyJWT_missingExp()
                                                 throws Exception
        Throws:
        Exception
      • testInvalidPrivateKeyJWT_expiredExp

        public void testInvalidPrivateKeyJWT_expiredExp()
                                                 throws Exception
        Throws:
        Exception
      • testInvalidPrivateKeyJWT_issuedInTheFuture

        public void testInvalidPrivateKeyJWT_issuedInTheFuture()
                                                        throws Exception
        Throws:
        Exception
      • testInvalidPrivateKeyJWT_missingJti

        public void testInvalidPrivateKeyJWT_missingJti()
                                                 throws Exception
        Throws:
        Exception
      • testInvalidPrivateKeyJWT_replayJti

        public void testInvalidPrivateKeyJWT_replayJti()
                                                throws Exception
        Throws:
        Exception
      • testValidPrivateKeyJWT

        public void testValidPrivateKeyJWT()
                                    throws Exception
        Throws:
        Exception
      • claimsSetMissingSub

        protected com.nimbusds.jwt.JWTClaimsSet claimsSetMissingSub()
      • claimsSetMissingIss

        protected com.nimbusds.jwt.JWTClaimsSet claimsSetMissingIss()
      • claimsSetMissingAud

        protected com.nimbusds.jwt.JWTClaimsSet claimsSetMissingAud()
      • claimsSetMissingExp

        protected com.nimbusds.jwt.JWTClaimsSet claimsSetMissingExp()
      • claimsSetExpiredExp

        protected com.nimbusds.jwt.JWTClaimsSet claimsSetExpiredExp()
      • claimsSetIssuedInTheFuture

        protected com.nimbusds.jwt.JWTClaimsSet claimsSetIssuedInTheFuture()
      • claimsSetMissingJti

        protected com.nimbusds.jwt.JWTClaimsSet claimsSetMissingJti()
      • validClaimsSet

        protected com.nimbusds.jwt.JWTClaimsSet validClaimsSet()
      • buildSecretJwtAuth

        protected com.nimbusds.oauth2.sdk.auth.ClientSecretJWT buildSecretJwtAuth​(String secret)
                                                                           throws com.nimbusds.jose.JOSEException,
                                                                                  URISyntaxException
        Throws:
        com.nimbusds.jose.JOSEException
        URISyntaxException
      • buildPrivateKeyJwtAuth

        protected com.nimbusds.oauth2.sdk.auth.PrivateKeyJWT buildPrivateKeyJwtAuth()
                                                                             throws com.nimbusds.jose.JOSEException,
                                                                                    URISyntaxException
        Throws:
        com.nimbusds.jose.JOSEException
        URISyntaxException
      • populateClientAssertionParams

        protected void populateClientAssertionParams​(Map<String,​String> requestParameters,
                                                     com.nimbusds.oauth2.sdk.auth.JWTAuthentication clientAuth)
      • launchWithJwtAuthentication

        protected abstract FlowExecutionResult launchWithJwtAuthentication​(com.nimbusds.jwt.SignedJWT jwt,
                                                                           com.nimbusds.jose.JWSAlgorithm algorithm,
                                                                           com.nimbusds.oauth2.sdk.auth.ClientAuthenticationMethod method)
                                                                    throws Exception
        Launch the flow with the JWT client authentication method.
        Parameters:
        jwt - The JWT to be used for client authentication.
        algorithm - The algorithm to be used in the client authentication.
        method - The client authentication method.
        Returns:
        The flow execution result.
        Throws:
        Exception
      • getErrorDetaisForJWTValidation

        protected abstract Pair<String,​String> getErrorDetaisForJWTValidation()
        Get the pair of error code and error description for the error produced via event EventIds.ACCESS_DENIED. This is abstract due to the fact that each endpoint may have its own mappings.
        Returns:
        The pair of error code and error description.
      • assertSuccessResponse

        protected abstract void assertSuccessResponse​(FlowExecutionResult result)
        Verify that the given result is a success response.
        Parameters:
        result - The flow execution result to be verified.