當前位置: 首頁>>代碼示例>>Python>>正文


Python OAuth2Credentials.from_json方法代碼示例

本文整理匯總了Python中oauth2client.client.OAuth2Credentials.from_json方法的典型用法代碼示例。如果您正苦於以下問題:Python OAuth2Credentials.from_json方法的具體用法?Python OAuth2Credentials.from_json怎麽用?Python OAuth2Credentials.from_json使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在oauth2client.client.OAuth2Credentials的用法示例。


在下文中一共展示了OAuth2Credentials.from_json方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: locked_get

# 需要導入模塊: from oauth2client.client import OAuth2Credentials [as 別名]
# 或者: from oauth2client.client.OAuth2Credentials import from_json [as 別名]
def locked_get(self):
        """Retrieve the credentials from the dictionary, if they exist.

        Returns: A :class:`oauth2client.client.OAuth2Credentials` instance.
        """
        serialized = self._dictionary.get(self._key)

        if serialized is None:
            return None

        credentials = OAuth2Credentials.from_json(serialized)
        credentials.set_store(self)

        return credentials 
開發者ID:0x0ece,項目名稱:oscars2016,代碼行數:16,代碼來源:dictionary_storage.py

示例2: locked_get

# 需要導入模塊: from oauth2client.client import OAuth2Credentials [as 別名]
# 或者: from oauth2client.client.OAuth2Credentials import from_json [as 別名]
def locked_get(self):
        serialized = session.get('google_oauth2_credentials')

        if serialized is None:
            return None

        credentials = OAuth2Credentials.from_json(serialized)
        credentials.set_store(self)

        return credentials 
開發者ID:satwikkansal,項目名稱:OneClickDTU,代碼行數:12,代碼來源:flask_util.py

示例3: locked_get

# 需要導入模塊: from oauth2client.client import OAuth2Credentials [as 別名]
# 或者: from oauth2client.client.OAuth2Credentials import from_json [as 別名]
def locked_get(self):
        serialized = session.get(_CREDENTIALS_KEY)

        if serialized is None:
            return None

        credentials = OAuth2Credentials.from_json(serialized)
        credentials.set_store(self)

        return credentials 
開發者ID:leeshlay,項目名稱:IoT_Parking,代碼行數:12,代碼來源:flask_util.py

示例4: pull_credentials

# 需要導入模塊: from oauth2client.client import OAuth2Credentials [as 別名]
# 或者: from oauth2client.client.OAuth2Credentials import from_json [as 別名]
def pull_credentials():
    """Pulls credentials out of session"""

    return OAuth2Credentials.from_json(session['credentials']) 
開發者ID:maheskett,項目名稱:Calendar-Analytics,代碼行數:6,代碼來源:server.py


注:本文中的oauth2client.client.OAuth2Credentials.from_json方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。