Class DuoOIDCAuthnController

  • All Implemented Interfaces:
    Component, DestructableComponent, InitializableComponent

    @ThreadSafe
    @Controller
    @RequestMapping("%{idp.duo.oidc.externalAuthnPath:/Authn/Duo/2FA}")
    public class DuoOIDCAuthnController
    extends AbstractInitializableComponent

    MVC controller for managing Duo 2FA exchanges implemented as an ExternalAuthentication mechanism.

    The controller initiates the Duo OIDC authorization code grant flow and accepts the authorization code response.

    Is effectively immutable once published by Spring. Is a thread-safe singleton.

    • Constructor Detail

      • DuoOIDCAuthnController

        public DuoOIDCAuthnController()
        Constructor.
    • Method Detail

      • authorizationRequest

        @GetMapping("/authorize")
        public void authorizationRequest​(@Nonnull
                                         javax.servlet.http.HttpServletRequest httpRequest,
                                         @Nonnull
                                         javax.servlet.http.HttpServletResponse httpResponse)
                                  throws net.shibboleth.idp.authn.ExternalAuthenticationException,
                                         IOException
        Start the Duo ODIC authorization code flow. The SWF execution key is encoded in the state parameter so it can be extracted on return from Duo.
        Parameters:
        httpRequest - servlet request
        httpResponse - servlet response
        Throws:
        net.shibboleth.idp.authn.ExternalAuthenticationException - if an error occurs
        IOException - if an I/O error occurs
      • authorizationCallback

        @GetMapping("/duo-callback")
        public void authorizationCallback​(@Nonnull
                                          javax.servlet.http.HttpServletRequest httpRequest,
                                          @Nonnull
                                          javax.servlet.http.HttpServletResponse httpResponse)
                                   throws net.shibboleth.idp.authn.ExternalAuthenticationException,
                                          IOException
        The redirect_uri endpoint for accepting an authorization code and resuming the flow execution.
        Parameters:
        httpRequest - servlet request
        httpResponse - servlet response
        Throws:
        net.shibboleth.idp.authn.ExternalAuthenticationException - if an error occurs
        IOException - if an I/O error occurs