Class DefaultCallbackLogic

  • All Implemented Interfaces:
    CallbackLogic

    public class DefaultCallbackLogic
    extends AbstractExceptionAwareLogic
    implements CallbackLogic

    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 java.lang.Object perform​(WebContext webContext,
                                        SessionStore sessionStore,
                                        Config config,
                                        HttpActionAdapter httpActionAdapter,
                                        java.lang.String inputDefaultUrl,
                                        java.lang.Boolean inputRenewSession,
                                        java.lang.String defaultClient)
        Description copied from interface: CallbackLogic
        Perform the callback logic.
        Specified by:
        perform in interface CallbackLogic
        Parameters:
        webContext - the web context
        sessionStore - the session store
        config - the security configuration
        httpActionAdapter - the HTTP action adapter
        inputDefaultUrl - the default url
        inputRenewSession - whether the session must be renewed
        defaultClient - the default client
        Returns:
        the resulting action of the callback
      • saveUserProfile

        protected void saveUserProfile​(WebContext context,
                                       SessionStore sessionStore,
                                       Config config,
                                       UserProfile profile,
                                       boolean saveProfileInSession,
                                       boolean multiProfile,
                                       boolean renewSession)
      • redirectToOriginallyRequestedUrl

        protected HttpAction redirectToOriginallyRequestedUrl​(WebContext context,
                                                              SessionStore sessionStore,
                                                              java.lang.String defaultUrl)
      • setClientFinder

        public void setClientFinder​(ClientFinder clientFinder)
      • setSavedRequestHandler

        public void setSavedRequestHandler​(SavedRequestHandler savedRequestHandler)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object