简述 OAuth 2.0 的运作流程

本文将以用户使用 github 登录网站留言为例,简述 OAuth 2.0 的运作流程。

假如我有一个网站,你是我网站上的访客,看了文章想留言表示「朕已阅」,留言时发现有这个网站的帐号才能够留言,此时给了你两个选择:一个是在我的网站上注册拥有一个新账户,然后用注册的用户名来留言;一个是使用 github 帐号登录,使用你的 github 用户名来留言。前者你觉得过于繁琐,于是惯性地点击了 github 登录按钮,此时 OAuth 认证流程就开始了。

Read More

CentOS7安装LNMP环境(PHP7+MySQL5.7+Nginx1.10)

工具

VMware版本号 : 12.0.0
CentOS版本 : 7.0

一、修改 yum 源

1
2
3
[root@localhost ~]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
[root@localhost ~]# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
[root@localhost ~]# rpm -Uvh http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm

Webtatic:https://webtatic.com
MySQL:https://dev.mysql.com/downloads/repo/yum/

报错:curl: (35) Cannot communicate securely with peer: no common encryption algorithm(s).
解决方法:yum update curl

报错:error: Failed dependencies: epel-release >= 7 is needed by webtatic-release-7-3.noarch
解决方法:yum -y install epel-release

Read More