diff --git a/src/SPID.AspNetCore.Authentication/SPID.AspNetCore.Authentication.csproj b/src/SPID.AspNetCore.Authentication/SPID.AspNetCore.Authentication.csproj index 7478f34..d9cc332 100644 --- a/src/SPID.AspNetCore.Authentication/SPID.AspNetCore.Authentication.csproj +++ b/src/SPID.AspNetCore.Authentication/SPID.AspNetCore.Authentication.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0;net5.0 + net8.0;net7.0;net6.0 latest AspNetCore Remote Authenticator for SPID Daniele Giallonardo, Stefano Mostarda @@ -23,11 +23,8 @@ - - - - - + + @@ -37,21 +34,17 @@ + + - - - - - - - + diff --git a/src/SPID.AspNetCore.Authentication/SpidHandler.cs b/src/SPID.AspNetCore.Authentication/SpidHandler.cs index cf8670a..ffd50be 100644 --- a/src/SPID.AspNetCore.Authentication/SpidHandler.cs +++ b/src/SPID.AspNetCore.Authentication/SpidHandler.cs @@ -632,12 +632,20 @@ await _logHandler.LogPostRequest(new PostRequest() RelayState = messageGuid, Url = url }); - await _response.WriteAsync($"Login
" + + string s = $"Login" + $"" + $"" + $"" + "" + - "
"); + ""; + + byte[] bytes = Encoding.UTF8.GetBytes(s); + _response.ContentLength = bytes.Length; + _response.ContentType = "text/html;charset=UTF-8"; + _response.Headers.CacheControl = "no-cache, no-store"; + _response.Headers.Pragma = "no-cache"; + _response.Headers.Expires = "Thu, 01 Jan 1970 00:00:00 GMT"; + await _response.Body.WriteAsync(bytes); } private async Task HandleRedirectRequest(string unsignedSerializedMessage, X509Certificate2 certificate, string url, string messageGuid)