Lines Matching full:credentials
27 from google.oauth2 import credentials
47 return credentials.Credentials(
58 credentials = self.make_credentials()
59 assert not credentials.valid
61 assert not credentials.expired
62 # Scopes aren't required for these credentials
63 assert not credentials.requires_scopes
65 assert credentials.refresh_token == self.REFRESH_TOKEN
66 assert credentials.token_uri == self.TOKEN_URI
67 assert credentials.client_id == self.CLIENT_ID
68 assert credentials.client_secret == self.CLIENT_SECRET
69 assert credentials.rapt_token == self.RAPT_TOKEN
70 assert credentials.refresh_handler is None
76 creds = credentials.Credentials(
101 credentials.Credentials(
139 credentials = self.make_credentials()
141 # Refresh credentials
142 credentials.refresh(request)
156 # Check that the credentials have the token and expiry
157 assert credentials.token == token
158 assert credentials.expiry == expiry
159 assert credentials.id_token == mock.sentinel.id_token
160 assert credentials.rapt_token == new_rapt_token
162 # Check that the credentials are valid (have a token and are not
164 assert credentials.valid
168 credentials_ = credentials.Credentials(token=None, refresh_token=None)
202 creds = credentials.Credentials(
212 # Refresh credentials
227 # Check that the credentials have the token and expiry
233 # Check that the credentials are valid (have a token and are not
248 creds = credentials.Credentials(
278 creds = credentials.Credentials(
310 creds = credentials.Credentials(
339 creds = credentials.Credentials(
370 creds = credentials.Credentials(
419 creds = credentials.Credentials(
431 # Refresh credentials
446 # Check that the credentials have the token and expiry
453 # Check that the credentials are valid (have a token and are not
484 creds = credentials.Credentials(
495 # Refresh credentials
510 # Check that the credentials have the token and expiry
517 # Check that the credentials are valid (have a token and are not
551 creds = credentials.Credentials(
562 # Refresh credentials
577 # Check that the credentials have the token and expiry
584 # Check that the credentials are valid (have a token and are not
619 creds = credentials.Credentials(
630 # Refresh credentials
648 # Check that the credentials have the token and expiry
655 # Check that the credentials are valid (have a token and are not
660 creds = credentials.Credentials(
675 creds = credentials.Credentials(
689 creds = credentials.Credentials(
707 creds = credentials.Credentials.from_authorized_user_info(info)
711 assert creds.token_uri == credentials._GOOGLE_OAUTH2_TOKEN_ENDPOINT
715 creds = credentials.Credentials.from_authorized_user_info(info, scopes)
719 assert creds.token_uri == credentials._GOOGLE_OAUTH2_TOKEN_ENDPOINT
723 creds = credentials.Credentials.from_authorized_user_info(info)
727 creds = credentials.Credentials.from_authorized_user_info(info)
732 creds = credentials.Credentials.from_authorized_user_info(info)
739 creds = credentials.Credentials.from_authorized_user_file(AUTH_USER_JSON_FILE)
743 assert creds.token_uri == credentials._GOOGLE_OAUTH2_TOKEN_ENDPOINT
748 creds = credentials.Credentials.from_authorized_user_file(
754 assert creds.token_uri == credentials._GOOGLE_OAUTH2_TOKEN_ENDPOINT
761 creds = credentials.Credentials.from_authorized_user_file(file_path)
765 assert creds.token_uri == credentials._GOOGLE_OAUTH2_TOKEN_ENDPOINT
773 creds = credentials.Credentials.from_authorized_user_info(info)
817 creds = credentials.Credentials(
858 # make sure a credentials file pickled with an older
863 credentials = pickle.load(f)
864 assert credentials.quota_project_id is None
869 cred = credentials.UserAccessTokenCredentials()
878 cred = credentials.UserAccessTokenCredentials()
883 cred = credentials.UserAccessTokenCredentials()
890 "google.oauth2.credentials.UserAccessTokenCredentials.apply", autospec=True
893 "google.oauth2.credentials.UserAccessTokenCredentials.refresh", autospec=True
896 cred = credentials.UserAccessTokenCredentials()