Refresh Token Request DTO (Login/RefreshRequest.cs)

netrock · src/backend/MyProject.WebApi/Features/Authentication/Dtos/Login/RefreshRequest.cs · csharp · MIT
auth, lang:csharp, tag:dto, tag:tokens, tag:refresh

Data transfer object carrying an optional refresh token for token-refresh endpoints. Reuse when supporting both cookie-based web clients and body-token mobile/API clients.

// Source: https://github.com/fpindej/netrock | License: MIT | Copyright 2025-2026 Filip Pindej
// Provided via justclaw.it.com; keep this notice with the code.
using JetBrains.Annotations;

namespace MyProject.WebApi.Features.Authentication.Dtos.Login;

/// <summary>
/// Request to refresh authentication tokens using a refresh token.
/// For web clients using cookies, this request body is optional.
/// For mobile/API clients, the refresh token must be provided in the request body.
/// </summary>
public class RefreshRequest
{
    /// <summary>
    /// The refresh token obtained from a previous login or refresh response.
    /// Required for mobile/API clients. Optional for web clients (will fall back to cookie).
    /// </summary>
    public string? RefreshToken { [UsedImplicitly] get; [Us

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key