package de.effigenix.shared.security;

import java.util.Optional;

/**
 * User Lookup Port - Domain-facing interface for resolving user display information.
 *
 * Allows Bounded Contexts to resolve user IDs to usernames without depending
 * on the User Management BC directly.
 *
 * Implementation: SpringUserLookupAdapter → UserRepository
 */
public interface UserLookupPort {

    /**
     * Resolves a user ID to a username.
     *
     * @param userId The user's unique identifier
     * @return The username, or empty if the user does not exist
     */
    Optional<String> resolveUsername(String userId);
}
