package com.social.media.service;

import com.social.media.dto.LoginRequest;
import com.social.media.dto.LoginResponse;

/**
 * Service interface for authentication operations
 */
public interface AuthService {
    
    /**
     * Authenticates a user with email and password
     * 
     * @param loginRequest the login request containing email and password
     * @return LoginResponse with authentication result
     */
    LoginResponse authenticate(LoginRequest loginRequest);
    
    /**
     * Logs out a user (invalidates session/token)
     * 
     * @param userId the user ID to logout
     * @return true if logout was successful
     */
    boolean logout(Long userId);
    
    /**
     * Validates if a user session is still valid
     * 
     * @param userId the user ID to validate
     * @param token the authentication token (if using JWT)
     * @return true if session is valid
     */
    boolean validateSession(Long userId, String token);
    
    /**
     * Refreshes an authentication token
     * 
     * @param refreshToken the refresh token
     * @return new authentication token
     */
    String refreshToken(String refreshToken);
}
