应用程序和服务器之间的安全连接 [英] Secured connection between app and server

查看:108
本文介绍了应用程序和服务器之间的安全连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用这些代码将离子应用程序连接到apiserver(获取)

I try these code to connect my ionic app to apiserver (get)

    import { Injectable } from '@angular/core';
    import { HttpClient } from '@angular/common/http';
    import { Observable } from 'rxjs';
    import { map } from 'rxjs/operators';

    @Injectable({
      providedIn: 'root'
    })
    export class EncryptionService {

      url = 'https://api.am....com';
      api-key='......'

      constructor(private http: HttpClient) { }

      newcheck(checkid: string ,cost: string,toname: string,tocode: string,passcode: string,date: string,checkfor: string,back: string): {
          return this.http.get(`${this.url}?key=${this.api-key}&checkid=${encodeURI(checkid)}`);
      }
    }

我的API具有API密钥并通过URL获取数据

my API has API key and get data in URL

  1. 我如何以安全的方式执行这些操作? 例如阻止某人监听和监视应用程序和服务器之间传输的数据?
  2. 防止某人分散应用程序对接收到的数据的干扰和伪造?
  3. 或确保该连接安全的任何事情
  1. how can i perform these in the secured way? for example to prevent someone to listen and monitor transferred data between app and server?
  2. prevent someone to distract and fake received data by app?
  3. or, anything to make this connection secured

推荐答案

似乎您已经在使用已加密的https. 默认情况下,应该阻止中间人攻击,因为浏览器会自动验证证书链.

It looks like you're already using https which is encrypted. A man in the middle attack should be prevented by default since browsers verify the certificate chain automatically.

我建议阅读本指南关于https.

I recommend reading this guide about https.

这篇关于应用程序和服务器之间的安全连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆