using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using ShoppingAssistantWebClient.Web.Network; namespace ShoppingAssistantWebClient.Web.Pages; public class IndexModel : PageModel { private readonly ILogger _logger; private readonly AuthenticationService _authenticationService; public IndexModel(ILogger logger, AuthenticationService authenticationService) { _authenticationService = authenticationService; _logger = logger; } public void OnGet() { var token = _authenticationService.GetAuthTokenAsync().Result; ViewData["Token"] = token; } }