// Copyright Epic Games, Inc. All Rights Reserved.
using HordeServer.Authentication;
using HordeServer.Models;
using HordeServer.Services;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace HordeServer.Controllers
{
/// User {User.Identity.Name} is logged in. Log out ");
Content.Append("Get bearer token Claims for {User.Identity.Name}:");
Content.Append("Horde Server
");
if (User.Identity.IsAuthenticated)
{
Content.Append($"
");
Content.Append("Get agent registration token
");
Content.Append("Get agent software upload token
");
Content.Append("Get agent software download token
");
Content.Append("Get configuration token
");
Content.Append("Get chained job token
");
Content.Append("");
foreach (System.Security.Claims.Claim Claim in User.Claims)
{
Content.Append($"
");
Content.Append(" ");
}
Content.Append("{Claim.Type} {Claim.Value}
Built from Perforce
"); } else { Content.Append(""); } Content.Append(""); return new ContentResult { ContentType = "text/html", StatusCode = (int)HttpStatusCode.OK, Content = Content.ToString() }; } ///User has been logged out. Returning to login page.
"; return new ContentResult { ContentType = "text/html", StatusCode = (int)HttpStatusCode.OK, Content = Content }; } } }