Home
last modified time | relevance | path

Searched refs:jwt (Results 1 – 25 of 50) sorted by relevance

12

/external/python/oauth2client/tests/
Dtest_jwt.py83 def _check_jwt_failure(self, jwt, expected_error): argument
90 crypt.verify_signed_jwt_with_certs(jwt, certs, audience)
109 jwt = self._create_signed_jwt()
113 contents = crypt.verify_signed_jwt_with_certs(jwt, certs, audience)
118 jwt = self._create_signed_jwt()
125 jwt, 'some_audience_address@testing.gserviceaccount.com',
131 jwt = self._create_signed_jwt()
139 jwt, 'some_audience_address@testing.gserviceaccount.com')
145 jwt = self._create_signed_jwt()
153 client.verify_id_token(jwt, test_email, http=http)
[all …]
Dtest_service_account.py391 self.jwt = service_account._JWTAccessCredentials(
402 token_info = self.jwt.get_access_token()
414 token_info = self.jwt.get_access_token()
425 token_info = self.jwt.get_access_token()
440 token_info = self.jwt.get_access_token(
456 self.jwt.revoke(None)
459 self.assertTrue(self.jwt.create_scoped_required())
462 self.jwt._private_key_pkcs12 = ''
463 self.jwt._private_key_password = ''
465 new_credentials = self.jwt.create_scoped('dummy_scope')
[all …]
Dtest_crypt.py275 jwt = b'.'.join([header, payload, signature])
279 crypt.verify_signed_jwt_with_certs(jwt, None)
302 jwt = b'.'.join([header, payload, signature])
305 jwt, certs, audience=audience)
/external/grpc-grpc/test/core/security/
Djwt_verifier_test.cc355 char* jwt = nullptr; in test_jwt_verifier_google_email_issuer_success() local
362 jwt = grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime, in test_jwt_verifier_google_email_issuer_success()
365 GPR_ASSERT(jwt != nullptr); in test_jwt_verifier_google_email_issuer_success()
366 grpc_jwt_verifier_verify(verifier, nullptr, jwt, expected_audience, in test_jwt_verifier_google_email_issuer_success()
370 gpr_free(jwt); in test_jwt_verifier_google_email_issuer_success()
388 char* jwt = nullptr; in test_jwt_verifier_custom_email_issuer_success() local
395 jwt = grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime, in test_jwt_verifier_custom_email_issuer_success()
398 GPR_ASSERT(jwt != nullptr); in test_jwt_verifier_custom_email_issuer_success()
399 grpc_jwt_verifier_verify(verifier, nullptr, jwt, expected_audience, in test_jwt_verifier_custom_email_issuer_success()
403 gpr_free(jwt); in test_jwt_verifier_custom_email_issuer_success()
[all …]
Dcreate_jwt.cc34 char* jwt; in create_jwt() local
46 jwt = grpc_jwt_encode_and_sign( in create_jwt()
50 if (jwt == nullptr) { in create_jwt()
55 fprintf(stdout, "%s\n", jwt); in create_jwt()
56 gpr_free(jwt); in create_jwt()
Djson_token_test.cc385 char* jwt = jwt_encode_and_sign_func(&json_key); in test_jwt_encode_and_sign() local
386 const char* dot = strchr(jwt, '.'); in test_jwt_encode_and_sign()
388 parsed_header = parse_json_part_from_jwt(jwt, static_cast<size_t>(dot - jwt), in test_jwt_encode_and_sign()
392 offset = static_cast<size_t>(dot - jwt) + 1; in test_jwt_encode_and_sign()
396 dot = strchr(jwt + offset, '.'); in test_jwt_encode_and_sign()
399 jwt + offset, static_cast<size_t>(dot - (jwt + offset)), &scratchpad); in test_jwt_encode_and_sign()
402 offset = static_cast<size_t>(dot - jwt) + 1; in test_jwt_encode_and_sign()
406 dot = strchr(jwt + offset, '.'); in test_jwt_encode_and_sign()
408 b64_signature = jwt + offset; in test_jwt_encode_and_sign()
409 check_jwt_signature(b64_signature, json_key.private_key, jwt, offset - 1); in test_jwt_encode_and_sign()
[all …]
Dverify_jwt.cc79 const char* jwt = nullptr; in main() local
85 gpr_cmdline_add_string(cl, "jwt", "JSON web token to verify", &jwt); in main()
88 if (jwt == nullptr || aud == nullptr) { in main()
100 grpc_jwt_verifier_verify(verifier, sync.pollset, jwt, aud, in main()
/external/rust/crates/grpcio-sys/grpc/test/core/security/
Djwt_verifier_test.cc373 char* jwt = nullptr; in test_jwt_verifier_google_email_issuer_success() local
380 jwt = grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime, in test_jwt_verifier_google_email_issuer_success()
383 GPR_ASSERT(jwt != nullptr); in test_jwt_verifier_google_email_issuer_success()
384 grpc_jwt_verifier_verify(verifier, nullptr, jwt, expected_audience, in test_jwt_verifier_google_email_issuer_success()
389 gpr_free(jwt); in test_jwt_verifier_google_email_issuer_success()
407 char* jwt = nullptr; in test_jwt_verifier_custom_email_issuer_success() local
414 jwt = grpc_jwt_encode_and_sign(&key, expected_audience, expected_lifetime, in test_jwt_verifier_custom_email_issuer_success()
417 GPR_ASSERT(jwt != nullptr); in test_jwt_verifier_custom_email_issuer_success()
418 grpc_jwt_verifier_verify(verifier, nullptr, jwt, expected_audience, in test_jwt_verifier_custom_email_issuer_success()
423 gpr_free(jwt); in test_jwt_verifier_custom_email_issuer_success()
[all …]
Dcreate_jwt.cc34 char* jwt; in create_jwt() local
46 jwt = grpc_jwt_encode_and_sign( in create_jwt()
50 if (jwt == nullptr) { in create_jwt()
55 fprintf(stdout, "%s\n", jwt); in create_jwt()
56 gpr_free(jwt); in create_jwt()
Djson_token_test.cc338 char* jwt = jwt_encode_and_sign_func(&json_key); in test_jwt_encode_and_sign() local
339 const char* dot = strchr(jwt, '.'); in test_jwt_encode_and_sign()
342 parse_json_part_from_jwt(jwt, static_cast<size_t>(dot - jwt)); in test_jwt_encode_and_sign()
345 offset = static_cast<size_t>(dot - jwt) + 1; in test_jwt_encode_and_sign()
347 dot = strchr(jwt + offset, '.'); in test_jwt_encode_and_sign()
350 jwt + offset, static_cast<size_t>(dot - (jwt + offset))); in test_jwt_encode_and_sign()
353 offset = static_cast<size_t>(dot - jwt) + 1; in test_jwt_encode_and_sign()
355 dot = strchr(jwt + offset, '.'); in test_jwt_encode_and_sign()
357 b64_signature = jwt + offset; in test_jwt_encode_and_sign()
358 check_jwt_signature(b64_signature, json_key.private_key, jwt, offset - 1); in test_jwt_encode_and_sign()
[all …]
Dverify_jwt.cc75 const char* jwt = nullptr; in main() local
81 gpr_cmdline_add_string(cl, "jwt", "JSON web token to verify", &jwt); in main()
84 if (jwt == nullptr || aud == nullptr) { in main()
96 grpc_jwt_verifier_verify(verifier, sync.pollset, jwt, aud, in main()
/external/python/oauth2client/oauth2client/
Dcrypt.py207 def verify_signed_jwt_with_certs(jwt, certs, audience=None): argument
224 jwt = _helpers._to_bytes(jwt)
226 if jwt.count(b'.') != 2:
228 'Wrong number of segments in token: {0}'.format(jwt))
230 header, payload, signature = jwt.split(b'.')
/external/rust/crates/grpcio-sys/grpc/src/core/lib/security/credentials/jwt/
Djwt_credentials.cc82 char* jwt = nullptr; in get_request_metadata() local
86 jwt = grpc_jwt_encode_and_sign(&key_, context.service_url, jwt_lifetime_, in get_request_metadata()
88 if (jwt != nullptr) { in get_request_metadata()
89 std::string md_value = absl::StrCat("Bearer ", jwt); in get_request_metadata()
90 gpr_free(jwt); in get_request_metadata()
Djwt_verifier.h110 grpc_pollset* pollset, const char* jwt,
Djwt_verifier.cc849 grpc_pollset* pollset, const char* jwt, in grpc_jwt_verifier_verify() argument
858 const char* cur = jwt; in grpc_jwt_verifier_verify()
861 GPR_ASSERT(verifier != nullptr && jwt != nullptr && audience != nullptr && in grpc_jwt_verifier_verify()
878 signed_jwt_len = static_cast<size_t>(dot - jwt); in grpc_jwt_verifier_verify()
884 signature, jwt, signed_jwt_len, user_data, cb)); in grpc_jwt_verifier_verify()
/external/grpc-grpc/src/core/lib/security/credentials/jwt/
Djwt_credentials.cc78 char* jwt = nullptr; in jwt_get_request_metadata() local
82 jwt = grpc_jwt_encode_and_sign(&c->key, context.service_url, in jwt_get_request_metadata()
84 if (jwt != nullptr) { in jwt_get_request_metadata()
86 gpr_asprintf(&md_value, "Bearer %s", jwt); in jwt_get_request_metadata()
87 gpr_free(jwt); in jwt_get_request_metadata()
Djwt_verifier.h111 grpc_pollset* pollset, const char* jwt,
Djwt_verifier.cc852 grpc_pollset* pollset, const char* jwt, in grpc_jwt_verifier_verify() argument
864 const char* cur = jwt; in grpc_jwt_verifier_verify()
866 GPR_ASSERT(verifier != nullptr && jwt != nullptr && audience != nullptr && in grpc_jwt_verifier_verify()
885 signed_jwt_len = static_cast<size_t>(dot - jwt); in grpc_jwt_verifier_verify()
891 signature, jwt, signed_jwt_len, user_data, cb)); in grpc_jwt_verifier_verify()
/external/rust/crates/grpcio-sys/grpc/tools/run_tests/python_utils/
Dcheck_on_pr.py24 import jwt
40 return jwt.encode(
/external/rust/crates/grpcio-sys/grpc/test/distrib/ruby/
Ddistribtest.gemspec18 s.add_dependency 'jwt', '< 2.0'
/external/grpc-grpc/test/distrib/ruby/
Ddistribtest.gemspec18 s.add_dependency 'jwt', '< 2.0'
/external/boringssl/src/util/fipstools/acvp/acvptool/test/vectors/
DKAS-FFC-SSC.bz2 ... 1[ 2 { 3 "jwt": "764fa7a9b1e37d3606cf41a79fe60e0676565fe8461bace3c8f51ced1e7adbb3e10545783b8105011438c8043c81b297a0549ed707ba90beeb62960baa21619ba0995e3cbb99005f7f6c6cb69314ad2d388c7a8ab0ee2b874a5d1553b7544f3d6ceb1a8d50345f59d132af5916332806148093237a0cdee5818fe9498b8f862d458faa400a6739b23e4e1cd83864ef7f77891e445113dc54ce0e74a68ab7659b9e27f965cb6a700e995ef149511701cce1d1b6e73d6ac877197cdd475bc7cc6f68ed39457e8ea094c96a331968d1c756a2f16d279a247fd614e71019e3efd34f0d629745e30cf130cfc93373c1136e19d4d2e7f256ea5b700430000dfc791e24f0d7896a03b70b24622755948423853568ca34fbc5fc01b247baa93f77f2b8a75a91d266b95a828f3d1a727ec0c918ba06214ea22cf3babfb4ff12c8bc4ff315af5555242066ab07a27e439aa88f205253c60f2f6adf9ef9a13f7ec379d5bc7b49cd4531460421b037920096d8c846c89aa7bd4e32bb911a91f88d7f4469daeeb01e64da4c1ef946a6565903d6f18a0e5dd5f6887fd487", 4 "url": "/acvp/ ...
/external/oss-fuzz/projects/influxdb/
DDockerfile20 RUN go get github.com/dgrijalva/jwt-go
/external/tensorflow/tensorflow/core/platform/cloud/
Doauth_client.cc217 const string jwt = to_sign + "." + signature; in GetTokenFromServiceAccountJson() local
219 strings::StrCat("grant_type=", kGrantType, "&assertion=", jwt); in GetTokenFromServiceAccountJson()
/external/grpc-grpc/src/python/grpcio_tests/tests/interop/
Dclient.py20 from google.auth import jwt as google_auth_jwt

12