Class DefaultCallbackLogic<R,​C extends WebContext>

  • All Implemented Interfaces:
    CallbackLogic<R,​C>

    public class DefaultCallbackLogic<R,​C extends WebContext>
    extends AbstractExceptionAwareLogic<R,​C>
    implements CallbackLogic<R,​C>

    Default callback logic:

    The credentials are extracted from the current request to fetch the user profile (from the identity provider) which is then saved in the web session. Finally, the user is redirected back to the originally requested url (or to the defaultUrl).

    Since:
    1.9.0
    Author:
    Jerome Leleu
    • Constructor Detail

      • DefaultCallbackLogic

        public DefaultCallbackLogic()
    • Method Detail

      • perform

        public R perform​(C context,
                         Config config,
                         HttpActionAdapter<R,​C> httpActionAdapter,
                         String inputDefaultUrl,
                         Boolean inputSaveInSession,
                         Boolean inputMultiProfile,
                         Boolean inputRenewSession,
                         String client)
        Description copied from interface: CallbackLogic
        Perform the callback logic.
        Specified by:
        perform in interface CallbackLogic<R,​C extends WebContext>
        Parameters:
        context - the web context
        config - the security configuration
        httpActionAdapter - the HTTP action adapter
        inputDefaultUrl - the default url
        inputSaveInSession - whether profile should be saved in session
        inputMultiProfile - whether multi profiles are supported
        inputRenewSession - whether the session must be renewed
        client - the default client
        Returns:
        the resulting action of the callback
      • saveUserProfile

        protected void saveUserProfile​(C context,
                                       Config config,
                                       UserProfile profile,
                                       boolean saveInSession,
                                       boolean multiProfile,
                                       boolean renewSession)
      • renewSession

        protected void renewSession​(C context,
                                    Config config)
      • redirectToOriginallyRequestedUrl

        protected HttpAction redirectToOriginallyRequestedUrl​(C context,
                                                              String defaultUrl)
      • setClientFinder

        public void setClientFinder​(ClientFinder clientFinder)
      • setSavedRequestHandler

        public void setSavedRequestHandler​(SavedRequestHandler savedRequestHandler)