From a7e8e9dbce38f3016bf33244dd787419715bd5b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Alberto=20Leiva=20Obando?= <56046999+jleiva-gap@users.noreply.github.com> Date: Thu, 13 Jun 2024 16:20:48 -0600 Subject: [PATCH] [AA-1744] NET 8 - Update Restsharp - Token Serialization (#469) * Update TokenRetriever.cs * Add previous AdminApp version * Update pgsql.Dockerfile * Update pgsql.Dockerfile Add a Hardcode prerelease version --- .../EdFi.Ods.AdminApp.Management/Api/TokenRetriever.cs | 7 ++++++- Docker/pgsql.Dockerfile | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Application/EdFi.Ods.AdminApp.Management/Api/TokenRetriever.cs b/Application/EdFi.Ods.AdminApp.Management/Api/TokenRetriever.cs index 79e71ec5..024b1d45 100644 --- a/Application/EdFi.Ods.AdminApp.Management/Api/TokenRetriever.cs +++ b/Application/EdFi.Ods.AdminApp.Management/Api/TokenRetriever.cs @@ -5,6 +5,7 @@ using System; using System.Net; +using System.Text.Json.Serialization; using EdFi.Ods.AdminApp.Management.ErrorHandling; using Newtonsoft.Json; using RestSharp; @@ -91,9 +92,13 @@ private string GetBearerToken(IRestClient oauthClient) internal class BearerTokenResponse { + [JsonPropertyName("access_token")] public string AccessToken { get; set; } - public string ExpiresIn { get; set; } + [JsonPropertyName("expires_in")] + public int ExpiresIn { get; set; } + [JsonPropertyName("token_type")] public string TokenType { get; set; } + [JsonPropertyName("error")] public string Error { get; set; } } } diff --git a/Docker/pgsql.Dockerfile b/Docker/pgsql.Dockerfile index ca810e73..cd867a29 100644 --- a/Docker/pgsql.Dockerfile +++ b/Docker/pgsql.Dockerfile @@ -24,7 +24,7 @@ COPY Settings/pgsql/run.sh /app/run.sh COPY Settings/pgsql/log4net.config /app/log4net.txt RUN apk --no-cache add unzip=~6 dos2unix=~7 bash=~5 gettext=~0 postgresql13-client=~13 jq=~1 icu=~74 curl=~8 && \ - wget -nv -O /app/AdminApp.zip "https://pkgs.dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_apis/packaging/feeds/EdFi/nuget/packages/EdFi.Suite3.ODS.AdminApp.Web/versions/${VERSION}/content" && \ + wget -nv -O /app/AdminApp.zip "https://pkgs.dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_apis/packaging/feeds/EdFi/nuget/packages/EdFi.Suite3.ODS.AdminApp.Web/versions/3.3.1-alpha.0.5/content" && \ unzip /app/AdminApp.zip AdminApp/* -d /app/ && \ cp -r /app/AdminApp/. /app/ && \ rm -f /app/AdminApp.zip && \