aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/security/credentials.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/security/credentials.h')
-rw-r--r--src/core/security/credentials.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/core/security/credentials.h b/src/core/security/credentials.h
index 8d40da47c1..04736525dc 100644
--- a/src/core/security/credentials.h
+++ b/src/core/security/credentials.h
@@ -190,9 +190,10 @@ grpc_oauth2_token_fetcher_credentials_parse_server_response(
grpc_credentials_md_store **token_md, gpr_timespec *token_lifetime);
void grpc_flush_cached_google_default_credentials(void);
-/* Simulates an oauth2 token fetch with the specified value for testing. */
-grpc_credentials *grpc_fake_oauth2_credentials_create(
- const char *token_md_value, int is_async);
+/* Metadata-only credentials with the specified key and value where
+ asynchronicity can be simulated for testing. */
+grpc_credentials *grpc_md_only_test_credentials_create(
+ const char *md_key, const char *md_value, int is_async);
/* Private constructor for jwt credentials from an already parsed json key.
Takes ownership of the key. */
@@ -216,6 +217,7 @@ typedef struct {
struct grpc_server_credentials {
const grpc_server_credentials_vtable *vtable;
const char *type;
+ grpc_auth_metadata_processor processor;
};
grpc_security_status grpc_server_credentials_create_security_connector(
@@ -297,13 +299,13 @@ typedef struct {
grpc_credentials_md_store *access_token_md;
} grpc_access_token_credentials;
-/* -- Fake Oauth2 credentials. -- */
+/* -- Metadata-only Test credentials. -- */
typedef struct {
grpc_credentials base;
- grpc_credentials_md_store *access_token_md;
+ grpc_credentials_md_store *md_store;
int is_async;
-} grpc_fake_oauth2_credentials;
+} grpc_md_only_test_credentials;
/* -- IAM credentials. -- */