/*
 * SPDX-License-Identifier: GPL-3.0-or-later
 */
package com.runicgateway.app.core.net

/** Shared HTTP constants for the auth layer (PLAN.md §4). */
object Http {
    /**
     * Marks the credential endpoints (login, refresh) that must run *without* a
     * bearer and must never trigger the refresh-on-401 [TokenAuthenticator].
     * [AuthInterceptor] sees it and skips attaching a token; the authenticator
     * sees it on the failed request and declines to refresh. It is a harmless
     * unknown header to the backend.
     */
    const val NO_SESSION_HEADER = "X-Runic-No-Session"
    const val AUTHORIZATION = "Authorization"

    fun bearer(token: String): String = "Bearer $token"
}
