一大坨GoogleAPI的学习笔记之三(基于oAuth2.0的domain-wide authentication)

本文介绍了如何在Google Apps中进行基于OAuth2.0的domain-wide authentication,允许域管理员访问包括Drive、Gmail等在内的其他用户数据。参照官方Drive的domain-wide认证文档,详细阐述了获取域下用户证书并构建Drive服务的过程。
摘要由CSDN通过智能技术生成

转载请注明原文地址地址:http://blog.csdn.net/btyh17mxy/article/details/9939035

    在Google Apps中域管理员可以访问域中其他用户的数据,包括Drive、Gmail什么的。当然要想访问就需要进行domain-wide(域)认证。

    在Google的官方文档中只有https://developers.google.com/drive/delegation这么一篇,介绍的是Drive的domain-wide认证,我参考了这篇文档并做了些修改。

#-coding:utf-8
#!/usr/bin/python

import httplib2
import pprint
import sys

from apiclient.discovery import build
from oauth2client.client import SignedJwtAssertionCredentials

"""Email of the Service Account"""
SERVICE_ACCOUNT_EMAIL = '下图中的email地址'

"""Path to the Service Account's Private Key file"""
SERVICE_ACCOUNT_PKCS12_FILE_PATH = &#
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值