Interface ServerLoginModel

  • All Known Implementing Classes:
    ServerLoginModelImpl

    public interface ServerLoginModel
    Author:
    Pavel.Sher Date: 26.09.2007
    • Method Detail

      • login

        @NotNull
        AuthenticatedUserInfo login​(@NotNull
                                    UserCredentials credentials)
                             throws AuthenticationFailedException
        Checks that user with specified credentials exists and attempts to login this user, i.e.: - grants this user a license - updates user last login timestamp - sets successfully authenticated user in the security context
        Parameters:
        credentials - user credentials
        Returns:
        successfully authenticated user
        Throws:
        AuthenticationFailedException - if there are no users with specified username and password
      • updateSecurityContext

        @NotNull
        AuthorityHolder updateSecurityContext​(@NotNull
                                              AuthorityHolder authorityHolder)
                                       throws UserNotFoundException
        Checks whether the specified user can still be logged in, i.e.: - the user exists - the user still has a license If all checks are successful, then the security context is updated with the specified user
        Returns:
        user currently stored in the security context
        Throws:
        UserNotFoundException - if user does not exist