aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/security/credentials.h
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-08-06 13:05:34 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-08-06 13:05:34 -0700
commitc2811525cf523b9831eefe3db88a58918095669a (patch)
treeadd25dd94795767dc119de1ecafacd24faa495a2 /src/core/security/credentials.h
parent2db17838e7f0de0603b53f043f1adf8043914aa2 (diff)
parent54b5018dd889cbc5059ff77ba083ff7020c63a9b (diff)
Merge branch 'server_creds_auth_md_processor' of github.com:jboeuf/grpc into tell-the-world-about-ALL-the-things
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. -- */