Class UpdateSessionWithAuthenticationResult

    • Constructor Detail

      • UpdateSessionWithAuthenticationResult

        public UpdateSessionWithAuthenticationResult()
        Constructor.
    • Method Detail

      • setSessionManager

        public void setSessionManager​(@Nonnull
                                      SessionManager manager)
        Set the SessionManager to use.
        Parameters:
        manager - session manager to use
      • setSessionContextCreationStrategy

        public void setSessionContextCreationStrategy​(@Nonnull
                                                      Function<ProfileRequestContext,​SessionContext> strategy)
        Set the lookup/creation strategy for the SessionContext to update.
        Parameters:
        strategy - creation/lookup strategy
      • setSubjectContextLookupStrategy

        public void setSubjectContextLookupStrategy​(@Nonnull
                                                    Function<ProfileRequestContext,​SubjectContext> strategy)
        Set the lookup strategy for the SubjectContext to access.
        Parameters:
        strategy - lookup strategy
      • doPreExecute

        protected boolean doPreExecute​(@Nonnull
                                       ProfileRequestContext profileRequestContext,
                                       @Nonnull
                                       AuthenticationContext authenticationContext)
        Performs this authentication action's pre-execute step. Default implementation just returns true.
        Overrides:
        doPreExecute in class AbstractAuthenticationAction
        Parameters:
        profileRequestContext - the current IdP profile request context
        authenticationContext - the current authentication context
        Returns:
        true iff execution should continue
      • doExecute

        protected void doExecute​(@Nonnull
                                 ProfileRequestContext profileRequestContext,
                                 @Nonnull
                                 AuthenticationContext authenticationContext)
        Performs this authentication action. Default implementation throws an exception.
        Overrides:
        doExecute in class AbstractAuthenticationAction
        Parameters:
        profileRequestContext - the current IdP profile request context
        authenticationContext - the current authentication context
      • updateIdPSession

        private void updateIdPSession​(@Nonnull
                                      AuthenticationContext authenticationContext,
                                      @Nonnull
                                      IdPSession session)
                               throws SessionException
        Update an existing session.

        If the result is the product of an attempted flow, then it's added to the session. If reused, its last activity time is updated.

        Parameters:
        authenticationContext - current authentication context
        session - session to update
        Throws:
        SessionException - if an error occurs updating the session
      • createIdPSession

        private void createIdPSession​(@Nonnull
                                      AuthenticationContext authenticationContext)
                               throws SessionException
        Create a new session and populate the SessionContext.
        Parameters:
        authenticationContext - current authentication context
        Throws:
        SessionException - if an error occurs creating the session