Ho aggiornato la libreria all'ultima versione nella mia applicazione (derivata dal progetto di sample 1_SimpleSPWebApp.
Aggiungendo nella lista degli IdP gli IdP di test che solitamente uso, in alcuni di essi l'applicazione ritorna questo errore ancor prima di reindirizzare la chiamata all'IdP:
System.Exception: L'url del single signon deve essere valorizzato
at SPID.AspNetCore.Authentication.Helpers.BusinessValidation.ValidationCondition(Func`1 condition, String error) in C:\Users\giacomo.rossi\tfs\NIT System SPID\SPID.AspNetCore.Authentication\Helpers\BusinessValidation.cs:line 17
at SPID.AspNetCore.Authentication.Saml.SamlHandler.GetAuthnRequest(String requestId, String entityId, String assertionConsumerServiceURL, Nullable`1 assertionConsumerServiceIndex, UInt16 attributeConsumingServiceIndex, X509Certificate2 certificate, Int32 securityLevel, RequestMethod requestMethod, IdentityProvider identityProvider) in C:\Users\giacomo.rossi\tfs\NIT System SPID\SPID.AspNetCore.Authentication\Saml\SamlHandler.cs:line 60
at SPID.AspNetCore.Authentication.SpidHandler.HandleChallengeAsync(AuthenticationProperties properties) in C:\Users\giacomo.rossi\tfs\NIT System SPID\SPID.AspNetCore.Authentication\SpidHandler.cs:line 111
at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.ChallengeAsync(AuthenticationProperties properties)
at Microsoft.AspNetCore.Authentication.AuthenticationService.ChallengeAsync(HttpContext context, String scheme, AuthenticationProperties properties)
at Microsoft.AspNetCore.Mvc.ChallengeResult.ExecuteResultAsync(ActionContext context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at SPID.AspNetCore.Authentication.Extensions.SpidSPMetadataMiddleware.Invoke(HttpContext context, IOptionsSnapshot`1 options, IServiceProvidersFactory serviceProvidersFactory) in C:\Users\giacomo.rossi\tfs\NIT System SPID\SPID.AspNetCore.Authentication\Extensions\SpidSPMetadataMiddleware.cs:line 36
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
Controlla i valori delle configurazioni degli IdP.
Per alcuni usi SingleSignOnServiceUrl, per altri usi SingleSignOnServiceUrlPost.
SingleSignOnServiceUrlPost è il valore corretto.
Ho aggiornato la libreria all'ultima versione nella mia applicazione (derivata dal progetto di sample 1_SimpleSPWebApp. Aggiungendo nella lista degli IdP gli IdP di test che solitamente uso, in alcuni di essi l'applicazione ritorna questo errore ancor prima di reindirizzare la chiamata all'IdP:
I providers da me aggiunti sono i seguenti: