API设计资料整理

 

接口认证

OAuth 2.0 [oauth-php]

自定服务与客户端相同算法认证

        // 签名认证 
            $signature = $this->request ( "signature" ); // app端生成的签名
            $token = $this->request ( "token" ); // app端生成的随机字符串
            
            if (! $signature || ! $token) {
                $this->wrong ( '缺少参数' );
            }
            
            $signature1 = md5 ( sha1 ( $token ) . C ( "SIGN_KEY" ) );
            
            if ($signature != $signature1) {
                $this->wrong ( '非法调用' );
            }

Continue reading “API设计资料整理”

linux-sources.list

ubuntu16.04阿里云源

  deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
  deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
  deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
  deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
  deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
  deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
  deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
  deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
  deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
  deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse

Continue reading “linux-sources.list”

每日英语

英语励志名言英语口语8000莎士比亚语录英语段子好玩的英文段子英语句子刷刷reddit金山词霸微博话题_每日英语

#每日英语# 2017年9月26日09:33:02
We are either progressing or retrograding all the while. There is no such thing as remaining stationary in this life.
—— 我们不是进步就是在退步, 人生没有所谓的停滞不前.


Continue reading “每日英语”