BLOG • DIGITAL INSIGHTS
Sitefinity 14.0 introduced a new authentication protocol that breaks the previous approach to protecting ServiceStack endpoints. This post covers the two simple changes needed - a middleware type swap and removing the openid scope - to get things working again.
Note: If your Sitefinity version is prior to 14.0, or you are using OpenID authentication rather than the new default introduced in 14.0 and above, please check the older article.
Sitefinity 14.0 introduced a new authentication protocol completely rewritten from scratch, which is now the recommended approach even for upgraded projects. This change causes the code from the previous article to stop working.
Fortunately, the changes needed are straightforward:
Telerik.Sitefinity.Authentication.Owin.OpenId.SitefinityOpenIdConnectWebApiAuthenticationMiddlewareTelerik.Sitefinity.Authentication.Owin.SitefinityAuthenticationMiddlewareopenid from the scopeDon't forget to register the OWIN startup class in your web.config under <appSettings>:
<add key="owin:appStartup" value="SitefinityWebApp.OwinStratup" />
The key difference from the previous version is the use of SitefinityAuthenticationMiddleware resolved via TypeResolutionService - replacing the old OpenID-specific middleware type.
Explore more insights and case studies from our team.