知识卡片
认证示例必须匹配接口机制
旧书用用户密码向authorizations端点请求token,并把access_token放查询串;不能将这套历史流程当当前GitHub接入方法。当前官方REST文档要求适当权限的token并通过Authorization头发送,用户密码认证不支持;应用客户端ID/secret也不等于用户登录凭证。认证成功还需区分操作权限和资源可见性。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- · 查看原书依据
https://api.github.com/authorizations' note= 'Mining the Social Web, 2nd Ed.' post_data = {'scopes':['repo'],'note': note } response= requests.post( url, auth= (username, password)
参考来源
- 位置:《社交网站的数据挖掘与分析(原书第2版)》第7章《7.2.1 建立GitHub API连接》(spine111;extracted/OReilly精品图书系列共21册(《Javascript权威指南》、《机器学习:实用案例解析》、《编写可读代码的艺术》、《算法精解》等)/_epub-src/text/part0100.html;u111-ch07-004)。
- 结论依据:原文在“https://api.github.com/authorizations”附近的定义、例子或代码支撑本卡核心说明:旧书用用户密码向authorizations端点请求token,并把access_token放查询串;不能将这套历史流程当当前GitHub接入方法。边界按已读前提解释;示例未执行。
- 原始内容:https://api.github.com/authorizations' note= 'Mining the Social Web, 2nd Ed.' post_data = {'scopes':['repo'],'note': note } response= requests.post( url, auth= (username, password)