mattmorg55 / Owin.Security.Keycloak

Keycloak Authentication Middleware for the C# OWIN Pipeline
http://keycloak.jboss.org
MIT License
17 stars 20 forks source link

IsAuthenticated never set with standard authentication flow #2

Closed mattmorg55 closed 7 years ago

mattmorg55 commented 7 years ago

In the SignInAsAuthentication() method in KeycloakAuthenticationHandler class, the method returned immediately if signInAuthType was equal to Options.AuthenticationType. I think this is a bug?

Changing: if (signInAuthType == Options.AuthenticationType) return;

To: if (!string.IsNullOrWhiteSpace(signInAuthType) && !signInAuthType.Equals(Options.AuthenticationType, StringComparison.OrdinalIgnoreCase)) return;

mattmorg55 commented 7 years ago

This change will go in 3.0.1