001// --------------------------------------------------------------------------------
002// Copyright 2002-2024 Echo Three, LLC
003//
004// Licensed under the Apache License, Version 2.0 (the "License");
005// you may not use this file except in compliance with the License.
006// You may obtain a copy of the License at
007//
008//     http://www.apache.org/licenses/LICENSE-2.0
009//
010// Unless required by applicable law or agreed to in writing, software
011// distributed under the License is distributed on an "AS IS" BASIS,
012// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013// See the License for the specific language governing permissions and
014// limitations under the License.
015// --------------------------------------------------------------------------------
016
017package com.echothree.control.user.authentication.common;
018
019import com.echothree.control.user.authentication.common.form.*;
020import com.echothree.model.data.user.common.pk.UserVisitPK;
021import com.echothree.util.common.command.CommandResult;
022
023public interface AuthenticationService
024        extends AuthenticationForms {
025    
026    // -------------------------------------------------------------------------
027    //   Testing
028    // -------------------------------------------------------------------------
029    
030    String ping();
031    
032    // -------------------------------------------------------------------------
033    //   User Visits and Sessions
034    // -------------------------------------------------------------------------
035    
036    CommandResult getJobUserVisit(GetJobUserVisitForm form);
037    
038    UserVisitPK getDataLoaderUserVisit();
039    
040    CommandResult getUserVisit(GetUserVisitForm form);
041
042    void invalidateUserSession(UserVisitPK userVisitPK);
043    
044    void invalidateUserVisit(UserVisitPK userVisitPK);
045    
046    CommandResult invalidateAbandonedUserVisits(UserVisitPK userVisitPK, InvalidateAbandonedUserVisitsForm form);
047    
048    CommandResult removeInactiveUserKeys(UserVisitPK userVisitPK, RemoveInactiveUserKeysForm form);
049    
050    CommandResult removeInvalidatedUserVisits(UserVisitPK userVisitPK);
051    
052    // -------------------------------------------------------------------------
053    //   Logins
054    // -------------------------------------------------------------------------
055    
056    CommandResult getCustomerLoginDefaults(UserVisitPK userVisitPK, GetCustomerLoginDefaultsForm form);
057    
058    CommandResult customerLogin(UserVisitPK userVisitPK, CustomerLoginForm form);
059    
060    CommandResult getEmployeeLoginDefaults(UserVisitPK userVisitPK, GetEmployeeLoginDefaultsForm form);
061    
062    CommandResult employeeLogin(UserVisitPK userVisitPK, EmployeeLoginForm form);
063    
064    CommandResult getVendorLoginDefaults(UserVisitPK userVisitPK, GetVendorLoginDefaultsForm form);
065    
066    CommandResult vendorLogin(UserVisitPK userVisitPK, VendorLoginForm form);
067    
068    CommandResult setPassword(UserVisitPK userVisitPK, SetPasswordForm form);
069    
070    CommandResult recoverPassword(UserVisitPK userVisitPK, RecoverPasswordForm form);
071    
072    CommandResult idle(UserVisitPK userVisitPK);
073    
074    CommandResult logout(UserVisitPK userVisitPK);
075    
076}