MCPcopy Create free account
hub / github.com/apache/trafficserver / authorizeGcp

Method authorizeGcp

plugins/origin_server_auth/origin_server_auth.cc:1066–1076  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1064}
1065
1066TSHttpStatus
1067S3Request::authorizeGcp(S3Config *s3)
1068{
1069 char auth[2048];
1070 int auth_len = snprintf(auth, sizeof(auth), "Bearer %s", s3->token());
1071
1072 if (!set_header(TS_MIME_FIELD_AUTHORIZATION, TS_MIME_LEN_AUTHORIZATION, auth, auth_len)) {
1073 return TS_HTTP_STATUS_INTERNAL_SERVER_ERROR;
1074 }
1075 return TS_HTTP_STATUS_OK;
1076}
1077
1078///////////////////////////////////////////////////////////////////////////////
1079// This is the main continuation.

Callers

nothing calls this directly

Calls 2

set_headerFunction · 0.50
tokenMethod · 0.45

Tested by

no test coverage detected