package com.example.furumi_android.domain.repository

import com.example.furumi_android.domain.model.AuthSession
import com.example.furumi_android.domain.model.ServerConfig
import com.example.furumi_android.domain.model.User

interface AuthRepository {
    suspend fun login(config: ServerConfig, password: String): Result<AuthSession>
    suspend fun createSsoAuthorizationUrl(serverUrl: String): Result<String>
    suspend fun completeSsoLogin(callbackUrl: String): Result<AuthSession>
    suspend fun logout(): Result<Unit>
    fun getCurrentSession(): AuthSession?
    fun getSavedServerUrl(): String?

    fun getCurrentUser(): User? {
        return getCurrentSession()?.user
    }
}
