Class ExchangeCodeForTokenTest


  • public class ExchangeCodeForTokenTest
    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

      • ExchangeCodeForTokenTest

        public ExchangeCodeForTokenTest()
    • 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.
      • testNullTokenResponse

        public void testNullTokenResponse()
                                   throws Exception
        Throws:
        Exception