简体   繁体   English

Angular JS SSL客户端身份验证

[英]Angular JS SSL client-side authentication

Is it possible for angular js to forward self signed certificates for establishing SSL/HTTPS connection? angular js是否可以转发自签名证书以建立SSL/HTTPS连接?

We're trying to insert a self signed certificate to establish https connection from a secured server through angularjs https service or XMLHTTPREQUEST , is it possible? 我们正在尝试插入自签名证书,以通过angularjs https服务或XMLHTTPREQUEST与受保护服务器建立https连接,这可能吗?

Angular JS can't use Client Side certificates. Angular JS不能使用客户端证书。 Here is why. 这就是为什么。 Client side certificates are used to ensure that the client is one of those limited set of client that have access to the server, hence the access to the client side certificate is limited to certain clients only. 客户端证书用于确保客户端是可以访问服务器的有限客户端之一,因此对客户端证书的访问仅限于某些客户端。 Providing it the Angular JS script to any one requesting it defies the purpose. 向任何请求它的人提供Angular JS脚本违反了这个目的。 If you use a self signed certificate (even though there is no mechanism in Angular JS to specify it), it won't help in using it for authentication as the server can't trust a self signed certificate. 如果您使用自签名证书(即使Angular JS中没有指定机制),由于服务器无法信任自签名证书,因此使用它进行身份验证也无济于事。

I may be clear it up a bit more if you provide the purpose of the action you are trying to perform. 如果您提供要执行的操作的目的,我可能会更加清楚。

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

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