Home
last modified time | relevance | path

Searched refs:creds (Results 1 – 25 of 237) sorted by relevance

12345678910

/external/grpc-grpc/src/core/lib/security/credentials/
Dcredentials.cc43 grpc_call_credentials* creds) { in grpc_credentials_metadata_request_create() argument
47 r->creds = grpc_call_credentials_ref(creds); in grpc_credentials_metadata_request_create()
53 grpc_call_credentials_unref(r->creds); in grpc_credentials_metadata_request_destroy()
59 grpc_channel_credentials* creds) { in grpc_channel_credentials_ref() argument
60 if (creds == nullptr) return nullptr; in grpc_channel_credentials_ref()
61 gpr_ref(&creds->refcount); in grpc_channel_credentials_ref()
62 return creds; in grpc_channel_credentials_ref()
65 void grpc_channel_credentials_unref(grpc_channel_credentials* creds) { in grpc_channel_credentials_unref() argument
66 if (creds == nullptr) return; in grpc_channel_credentials_unref()
67 if (gpr_unref(&creds->refcount)) { in grpc_channel_credentials_unref()
[all …]
Dcredentials.h112 grpc_channel_credentials* creds);
113 void grpc_channel_credentials_unref(grpc_channel_credentials* creds);
120 grpc_channel_credentials* creds, const char* target,
129 grpc_channel_credentials* creds);
180 grpc_call_credentials* grpc_call_credentials_ref(grpc_call_credentials* creds);
181 void grpc_call_credentials_unref(grpc_call_credentials* creds);
188 grpc_call_credentials* creds, grpc_polling_entity* pollent,
220 grpc_server_credentials* creds, grpc_server_security_connector** sc);
223 grpc_server_credentials* creds);
225 void grpc_server_credentials_unref(grpc_server_credentials* creds);
[all …]
/external/python/google-auth-library-python/tests/oauth2/
Dtest_credentials.py76 creds = credentials.Credentials(
88 assert creds.refresh_handler is original_refresh_handler
90 creds.refresh_handler = updated_refresh_handler
92 assert creds.refresh_handler is updated_refresh_handler
94 creds.refresh_handler = None
96 assert creds.refresh_handler is None
202 creds = credentials.Credentials(
213 creds.refresh(request)
228 assert creds.token == token
229 assert creds.expiry == expiry
[all …]
/external/python/google-auth-library-python/tests_async/oauth2/
Dtest_credentials_async.py87 creds = self.make_credentials()
90 await creds.refresh(request)
105 assert creds.token == token
106 assert creds.expiry == expiry
107 assert creds.id_token == mock.sentinel.id_token
108 assert creds.rapt_token == rapt_token
112 assert creds.valid
152 creds = _credentials_async.Credentials(
163 await creds.refresh(request)
178 assert creds.token == token
[all …]
/external/grpc-grpc/src/core/lib/security/credentials/alts/
Dalts_credentials.cc36 static void alts_credentials_destruct(grpc_channel_credentials* creds) { in alts_credentials_destruct() argument
38 reinterpret_cast<grpc_alts_credentials*>(creds); in alts_credentials_destruct()
43 static void alts_server_credentials_destruct(grpc_server_credentials* creds) { in alts_server_credentials_destruct() argument
45 reinterpret_cast<grpc_alts_server_credentials*>(creds); in alts_server_credentials_destruct()
51 grpc_channel_credentials* creds, in alts_create_security_connector() argument
56 creds, request_metadata_creds, target_name, sc); in alts_create_security_connector()
60 grpc_server_credentials* creds, grpc_server_security_connector** sc) { in alts_server_create_security_connector() argument
61 return grpc_alts_server_security_connector_create(creds, sc); in alts_server_create_security_connector()
77 auto creds = static_cast<grpc_alts_credentials*>( in grpc_alts_credentials_create_customized() local
79 creds->options = grpc_alts_credentials_options_copy(options); in grpc_alts_credentials_create_customized()
[all …]
/external/grpc-grpc/src/core/lib/security/credentials/local/
Dlocal_credentials.cc32 static void local_credentials_destruct(grpc_channel_credentials* creds) {} in local_credentials_destruct() argument
34 static void local_server_credentials_destruct(grpc_server_credentials* creds) {} in local_server_credentials_destruct() argument
37 grpc_channel_credentials* creds, in local_create_security_connector() argument
42 creds, request_metadata_creds, args, target_name, sc); in local_create_security_connector()
46 grpc_server_credentials* creds, grpc_server_security_connector** sc) { in local_server_create_security_connector() argument
47 return grpc_local_server_security_connector_create(creds, sc); in local_server_create_security_connector()
59 auto creds = static_cast<grpc_local_credentials*>( in grpc_local_credentials_create() local
61 creds->connect_type = connect_type; in grpc_local_credentials_create()
62 creds->base.type = GRPC_CREDENTIALS_TYPE_LOCAL; in grpc_local_credentials_create()
63 creds->base.vtable = &local_credentials_vtable; in grpc_local_credentials_create()
[all …]
/external/rust/crates/grpcio-sys/grpc/test/core/security/
Dcredentials_test.cc423 grpc_call_credentials* creds; member
487 static void run_request_metadata_test(grpc_call_credentials* creds, in run_request_metadata_test() argument
491 if (creds->get_request_metadata(&state->pollent, auth_md_ctx, in run_request_metadata_test()
508 grpc_call_credentials* creds = grpc_google_iam_credentials_create( in test_google_iam_creds() local
512 GPR_ASSERT(creds->min_security_level() == GRPC_PRIVACY_AND_INTEGRITY); in test_google_iam_creds()
515 run_request_metadata_test(creds, auth_md_ctx, state); in test_google_iam_creds()
516 creds->Unref(); in test_google_iam_creds()
524 grpc_call_credentials* creds = in test_access_token_creds() local
528 GPR_ASSERT(strcmp(creds->type(), GRPC_CALL_CREDENTIALS_TYPE_OAUTH2) == 0); in test_access_token_creds()
530 GPR_ASSERT(creds->min_security_level() == GRPC_PRIVACY_AND_INTEGRITY); in test_access_token_creds()
[all …]
Dfetch_oauth2.cc79 grpc_call_credentials* creds = nullptr; in main() local
117 creds = grpc_google_compute_engine_credentials_create(nullptr); in main()
118 if (creds == nullptr) { in main()
123 creds = create_refresh_token_creds(json_refresh_token_file_path); in main()
124 if (creds == nullptr) { in main()
132 creds = create_sts_creds(json_sts_options_file_path); in main()
133 if (creds == nullptr) { in main()
146 GPR_ASSERT(creds != nullptr); in main()
148 token = grpc_test_fetch_oauth2_token_with_credentials(creds); in main()
153 grpc_call_credentials_release(creds); in main()
/external/rust/crates/grpcio-sys/grpc/src/core/lib/security/credentials/
Dcredentials.cc42 void grpc_channel_credentials_release(grpc_channel_credentials* creds) { in grpc_channel_credentials_release() argument
43 GRPC_API_TRACE("grpc_channel_credentials_release(creds=%p)", 1, (creds)); in grpc_channel_credentials_release()
45 if (creds) creds->Unref(); in grpc_channel_credentials_release()
48 void grpc_call_credentials_release(grpc_call_credentials* creds) { in grpc_call_credentials_release() argument
49 GRPC_API_TRACE("grpc_call_credentials_release(creds=%p)", 1, (creds)); in grpc_call_credentials_release()
51 if (creds) creds->Unref(); in grpc_call_credentials_release()
98 void grpc_server_credentials_release(grpc_server_credentials* creds) { in grpc_server_credentials_release() argument
99 GRPC_API_TRACE("grpc_server_credentials_release(creds=%p)", 1, (creds)); in grpc_server_credentials_release()
101 if (creds) creds->Unref(); in grpc_server_credentials_release()
116 grpc_server_credentials* creds, grpc_auth_metadata_processor processor) { in grpc_server_credentials_set_auth_metadata_processor() argument
[all …]
/external/grpc-grpc/src/core/lib/security/credentials/composite/
Dcomposite_credentials.cc44 static void composite_call_destruct(grpc_call_credentials* creds) { in composite_call_destruct() argument
46 reinterpret_cast<grpc_composite_call_credentials*>(creds); in composite_call_destruct()
77 grpc_call_credentials* creds, grpc_polling_entity* pollent, in composite_call_get_request_metadata() argument
82 reinterpret_cast<grpc_composite_call_credentials*>(creds); in composite_call_get_request_metadata()
111 grpc_call_credentials* creds, grpc_credentials_mdelem_array* md_array, in composite_call_cancel_get_request_metadata() argument
114 reinterpret_cast<grpc_composite_call_credentials*>(creds); in composite_call_cancel_get_request_metadata()
129 grpc_call_credentials* creds = *creds_addr; in get_creds_array() local
132 if (strcmp(creds->type, GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE) == 0) { in get_creds_array()
133 result = *grpc_composite_call_credentials_get_credentials(creds); in get_creds_array()
177 grpc_composite_call_credentials_get_credentials(grpc_call_credentials* creds) { in grpc_composite_call_credentials_get_credentials() argument
[all …]
/external/curl/tests/http/testenv/
Dcerts.py189 creds = self._store.get_credentials_for_name(name) if self._store else []
190 return creds[0] if len(creds) else None
202 creds = None
204 creds = self._store.load_credentials(
206 if creds is None:
207 creds = TestCA.create_credentials(spec=spec, issuer=self, key_type=key_type,
210 self._store.save(creds, single_file=spec.single_file)
212 self._store.save_chain(creds, "ca", with_root=True)
216 sub_store = CertStore(fpath=os.path.join(self._store.path, creds.name))
217 creds.set_store(sub_store)
[all …]
/external/python/oauth2client/tests/contrib/
Dtest__appengine_ndb.py36 creds = appengine.CredentialsNDBProperty() variable in TestNDBModel
100 creds = client.Credentials()
101 instance = TestNDBModel(creds=creds, id='bar')
104 self.assertIsInstance(retrieved.creds, client.Credentials)
108 creds_prop = TestNDBModel.creds
116 creds_prop = TestNDBModel.creds
124 creds_prop = TestNDBModel.creds
132 creds_prop = TestNDBModel.creds
133 creds = client.Credentials()
134 creds_json = json.loads(creds_prop._to_base_type(creds))
[all …]
Dtest_devshell.py207 creds = devshell.DevshellCredentials()
208 self.assertEquals(None, creds.refresh_token)
215 creds = devshell.DevshellCredentials()
216 self.assertEqual('joe@example.com', creds.user_email)
217 self.assertEqual('fooproj', creds.project_id)
218 self.assertEqual('sometoken', creds.access_token)
221 creds.token_expiry)
226 creds = devshell.DevshellCredentials()
227 self.assertEqual('joe@example.com', creds.user_email)
228 self.assertEqual(None, creds.project_id)
[all …]
/external/grpc-grpc-java/auth/src/main/java/io/grpc/auth/
DGoogleAuthLibraryCallCredentials.java59 final Credentials creds; field in GoogleAuthLibraryCallCredentials
64 public GoogleAuthLibraryCallCredentials(Credentials creds) { in GoogleAuthLibraryCallCredentials() argument
65 this(creds, jwtHelper); in GoogleAuthLibraryCallCredentials()
69 GoogleAuthLibraryCallCredentials(Credentials creds, JwtHelper jwtHelper) { in GoogleAuthLibraryCallCredentials() argument
70 checkNotNull(creds, "creds"); in GoogleAuthLibraryCallCredentials()
77 requirePrivacy = googleCredentialsClass.isInstance(creds); in GoogleAuthLibraryCallCredentials()
80 creds = jwtHelper.tryServiceAccountToJwt(creds); in GoogleAuthLibraryCallCredentials()
83 this.creds = creds; in GoogleAuthLibraryCallCredentials()
110 creds.getRequestMetadata(uri, appExecutor, new RequestMetadataCallback() { in applyRequestMetadata()
273 public Credentials tryServiceAccountToJwt(Credentials creds) { in tryServiceAccountToJwt() argument
[all …]
/external/grpc-grpc/test/core/security/
Dcredentials_test.cc311 grpc_call_credentials* creds; member
375 static void run_request_metadata_test(grpc_call_credentials* creds, in run_request_metadata_test() argument
380 creds, &state->pollent, auth_md_ctx, &state->md_array, in run_request_metadata_test()
396 grpc_call_credentials* creds = grpc_google_iam_credentials_create( in test_google_iam_creds() local
401 run_request_metadata_test(creds, auth_md_ctx, state); in test_google_iam_creds()
402 grpc_call_credentials_unref(creds); in test_google_iam_creds()
410 grpc_call_credentials* creds = in test_access_token_creds() local
414 GPR_ASSERT(strcmp(creds->type, GRPC_CALL_CREDENTIALS_TYPE_OAUTH2) == 0); in test_access_token_creds()
415 run_request_metadata_test(creds, auth_md_ctx, state); in test_access_token_creds()
416 grpc_call_credentials_unref(creds); in test_access_token_creds()
[all …]
Dfetch_oauth2.cc46 grpc_call_credentials* creds = nullptr; in main() local
77 creds = grpc_google_compute_engine_credentials_create(nullptr); in main()
78 if (creds == nullptr) { in main()
83 creds = create_refresh_token_creds(json_refresh_token_file_path); in main()
84 if (creds == nullptr) { in main()
95 GPR_ASSERT(creds != nullptr); in main()
97 token = grpc_test_fetch_oauth2_token_with_credentials(creds); in main()
102 grpc_call_credentials_release(creds); in main()
/external/grpc-grpc/src/core/lib/security/credentials/google_default/
Dgoogle_default_credentials.cc69 grpc_channel_credentials* creds) { in google_default_credentials_destruct() argument
71 reinterpret_cast<grpc_google_default_channel_credentials*>(creds); in google_default_credentials_destruct()
77 grpc_channel_credentials* creds, grpc_call_credentials* call_creds, in google_default_create_security_connector() argument
81 reinterpret_cast<grpc_google_default_channel_credentials*>(creds); in google_default_create_security_connector()
118 char* creds_path, grpc_call_credentials** creds) { in create_default_creds_from_path() argument
175 *creds = result; in create_default_creds_from_path()
229 auto creds = static_cast<grpc_google_default_channel_credentials*>( in grpc_google_default_credentials_create() local
231 creds->base.vtable = &google_default_credentials_vtable; in grpc_google_default_credentials_create()
232 creds->base.type = GRPC_CHANNEL_CREDENTIALS_TYPE_GOOGLE_DEFAULT; in grpc_google_default_credentials_create()
233 gpr_ref_init(&creds->base.refcount, 1); in grpc_google_default_credentials_create()
[all …]
/external/rust/crates/grpcio-sys/grpc/src/cpp/client/
Dcreate_channel.cc32 const std::shared_ptr<grpc::ChannelCredentials>& creds) { in CreateChannel() argument
33 return CreateCustomChannel(target, creds, grpc::ChannelArguments()); in CreateChannel()
38 const std::shared_ptr<grpc::ChannelCredentials>& creds, in CreateCustomChannel() argument
42 return creds ? creds->CreateChannelImpl(target, args) in CreateCustomChannel()
67 const std::shared_ptr<grpc::ChannelCredentials>& creds, in CreateCustomChannelWithInterceptors() argument
74 return creds ? creds->CreateChannelWithInterceptors( in CreateCustomChannelWithInterceptors()
/external/grpc-grpc/src/ruby/ext/grpc/
Drb_channel_credentials.c145 grpc_channel_credentials* creds = NULL; in grpc_rb_channel_credentials_init() local
162 creds = grpc_ssl_credentials_create(pem_root_certs_cstr, NULL, NULL, NULL); in grpc_rb_channel_credentials_init()
166 creds = grpc_ssl_credentials_create(pem_root_certs_cstr, &key_cert_pair, in grpc_rb_channel_credentials_init()
169 if (creds == NULL) { in grpc_rb_channel_credentials_init()
173 wrapper->wrapped = creds; in grpc_rb_channel_credentials_init()
185 grpc_channel_credentials* creds; in grpc_rb_channel_credentials_compose() local
194 creds = grpc_rb_get_wrapped_channel_credentials(self); in grpc_rb_channel_credentials_compose()
198 creds = grpc_composite_channel_credentials_create(creds, other, NULL); in grpc_rb_channel_credentials_compose()
202 prev = creds; in grpc_rb_channel_credentials_compose()
204 if (creds == NULL) { in grpc_rb_channel_credentials_compose()
[all …]
/external/grpc-grpc/src/core/lib/security/credentials/plugin/
Dplugin_credentials.cc38 static void plugin_destruct(grpc_call_credentials* creds) { in plugin_destruct() argument
40 reinterpret_cast<grpc_plugin_credentials*>(creds); in plugin_destruct()
67 gpr_mu_lock(&r->creds->mu); in pending_request_complete()
68 if (!r->cancelled) pending_request_remove_locked(r->creds, r); in pending_request_complete()
69 gpr_mu_unlock(&r->creds->mu); in pending_request_complete()
71 grpc_call_credentials_unref(&r->creds->base); in pending_request_complete()
129 r->creds, r); in plugin_md_request_metadata_ready()
142 r->creds, r); in plugin_md_request_metadata_ready()
147 static bool plugin_get_request_metadata(grpc_call_credentials* creds, in plugin_get_request_metadata() argument
154 reinterpret_cast<grpc_plugin_credentials*>(creds); in plugin_get_request_metadata()
[all …]
/external/rust/crates/grpcio/src/security/
Dcredentials.rs196 ServerCredentials { creds: credentials } in build()
216 creds: *mut grpc_server_credentials, field
222 pub(crate) unsafe fn frow_raw(creds: *mut grpc_server_credentials) -> ServerCredentials { in frow_raw()
223 ServerCredentials { creds } in frow_raw()
227 self.creds in as_mut_ptr()
234 grpc_sys::grpc_server_credentials_release(self.creds); in drop()
290 let creds = unsafe { in build() localVariable
322 ChannelCredentials { creds } in build()
339 creds: *mut grpc_channel_credentials, field
344 self.creds in as_mut_ptr()
[all …]
/external/python/oauth2client/tests/
Dtest_service_account.py64 creds = service_account.ServiceAccountCredentials(
66 self.assertEqual(creds._signer, signer)
69 serialized_str = creds._to_json([], to_serialize.copy())
139 for creds in (base_creds, creds_with_uris_from_file):
141 creds, service_account.ServiceAccountCredentials)
142 self.assertEqual(creds.client_id, client_id)
143 self.assertEqual(creds._service_account_email, client_email)
144 self.assertEqual(creds._private_key_id, private_key_id)
145 self.assertEqual(creds._private_key_pkcs8_pem, private_key)
146 self.assertEqual(creds._scopes, ' '.join(scopes))
[all …]
/external/grpc-grpc/test/cpp/interop/
Dclient_helper.cc65 std::shared_ptr<CallCredentials> creds = GoogleComputeEngineCredentials(); in GetOauth2AccessToken() local
67 dynamic_cast<SecureCallCredentials*>(creds.get()); in GetOauth2AccessToken()
89 std::shared_ptr<CallCredentials> creds; in CreateChannelForTestCase() local
91 creds = FLAGS_custom_credentials_type == "google_default_credentials" in CreateChannelForTestCase()
97 creds = FLAGS_custom_credentials_type == "google_default_credentials" in CreateChannelForTestCase()
102 creds = FLAGS_custom_credentials_type == "google_default_credentials" in CreateChannelForTestCase()
110 security_type, !FLAGS_use_test_ca, creds); in CreateChannelForTestCase()
112 return CreateTestChannel(host_port, FLAGS_custom_credentials_type, creds); in CreateChannelForTestCase()
/external/grpc-grpc/test/cpp/util/
Dcreate_test_channel.cc72 const std::shared_ptr<CallCredentials>& creds, in CreateTestChannel() argument
95 if (creds.get()) { in CreateTestChannel()
96 channel_creds = CompositeChannelCredentials(channel_creds, creds); in CreateTestChannel()
111 const std::shared_ptr<CallCredentials>& creds, in CreateTestChannel() argument
119 creds, args); in CreateTestChannel()
125 const std::shared_ptr<CallCredentials>& creds) { in CreateTestChannel() argument
127 use_prod_roots, creds, ChannelArguments()); in CreateTestChannel()
145 const std::shared_ptr<CallCredentials>& creds) { in CreateTestChannel() argument
151 if (creds.get()) { in CreateTestChannel()
152 channel_creds = CompositeChannelCredentials(channel_creds, creds); in CreateTestChannel()
/external/grpc-grpc/src/php/ext/grpc/
Dchannel.c219 wrapped_grpc_channel_credentials *creds) { in create_channel() argument
220 if (creds == NULL) { in create_channel()
225 grpc_secure_channel_create(creds->wrapped, target, &args, NULL); in create_channel()
236 wrapped_grpc_channel_credentials *creds, in create_and_add_channel_to_persistent_list() argument
249 create_channel(channel, target, args, creds); in create_and_add_channel_to_persistent_list()
266 create_channel(channel, target, args, creds); in create_and_add_channel_to_persistent_list()
306 wrapped_grpc_channel_credentials *creds = NULL; in PHP_METHOD() local
323 creds = NULL; in PHP_METHOD()
332 creds = PHP_GRPC_GET_WRAPPED_OBJECT(wrapped_grpc_channel_credentials, in PHP_METHOD()
381 if (creds != NULL && creds->hashstr != NULL) { in PHP_METHOD()
[all …]

12345678910