Blogger Information
Blog 19
fans 0
comment 2
visits 31225
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
苹果授权登陆 后端PHP验证
会飞的码蚁的博客
Original
2565 people have browsed it

1. identityToken 的验证:
    客户端会向后端 传递 userId  identityToken email 等参数
    后端必须要验证 identityToken 的有效性,合法性
    identityToken  是 JWT算法格式
    使用到的Apple公钥接口:GET  https://appleid.apple.com/auth/keys=$keys 
    返回如下:


        import('@.ORG.yunke_jwt');        $keys = I("post.keys");        $identityToken = I('post.token');        $sub = I('post.sub');        if (empty($keys) || empty($identityToken) || empty($sub)) {            $this->returnAjax("参数错误!",101);        }

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post