简体   繁体   English

如何从 Xamarin.Forms 应用程序执行 SAML 2.0 身份验证

[英]How to do SAML 2.0 Auth from Xamarin.Forms application

I have a Xamarin.Forms application that will have to authenticate against SAML 2.0, I have researched and all plugins and libraries are either too old or do not support SAML 2.0.我有一个 Xamarin.Forms 应用程序,它必须针对 SAML 2.0 进行身份验证,我已经研究过,所有插件和库要么太旧,要么不支持 SAML 2.0。 Any idea or suggestion on how it could be done for Xamarin.Forms?关于如何为 Xamarin.Forms 完成它的任何想法或建议?

Thanks谢谢

SAML2 is a web single sign on protocol and is not meant to be used by a mobile application. SAML2 是一种 Web 单点登录协议,不适用于移动应用程序。

For a mobile application you want both authentication at the mobile app level, as well as a bearer token for calls to backend APIS.对于移动应用程序,您需要在移动应用程序级别进行身份验证,以及用于调用后端 APIS 的承载令牌。 OpenID Connect is the solution for that. OpenID Connect 是解决方案。 So you should set up your application to use OpenID Connect and then use a token issuer that can authenticate users through SAML2.因此,您应该将应用程序设置为使用 OpenID Connect,然后使用可以通过 SAML2 对用户进行身份验证的令牌颁发者。 IdentityServer4 together with Saml2 authentication handler is a good open source option for that. IdentityServer4 与 Saml2 身份验证处理程序一起是一个很好的开源选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM