Class ExchangeCodeForAccessTokenTest


  • public class ExchangeCodeForAccessTokenTest
    extends AbstractOIDCTest
    Tests for the ExchangeCodeForAccessToken action.
    • Field Detail

      • exchangeAction

        @Nonnull
        private net.shibboleth.idp.plugin.authn.oidc.rp.impl.ExchangeCodeForAccessToken exchangeAction
        The action to test.
    • Constructor Detail

      • ExchangeCodeForAccessTokenTest

        public ExchangeCodeForAccessTokenTest()
    • Method Detail

      • testTokenExchange

        public void testTokenExchange()
                               throws Exception
        Test the token exchange works using a mocked HTTP client and response. Does not check the signature is valid. Given the amount of mocking, is not a very thorough test.
        Throws:
        Exception - on error.
      • testTokenExchange_WrongTokenType

        public void testTokenExchange_WrongTokenType()
                                              throws Exception
        Throws:
        Exception
      • testTokenExchange_ErrorResponse

        public void testTokenExchange_ErrorResponse()
                                             throws Exception
        Throws:
        Exception
      • testNullTokenResponse

        public void testNullTokenResponse()
                                   throws Exception
        Throws:
        Exception