| 748 | } |
| 749 | |
| 750 | static bool HandleTrustedAuthHeader(ThriftServer::ConnectionContext* connection_context, |
| 751 | const AuthenticationHash& hash, const string& auth_header) { |
| 752 | if (!GetUsernameFromBasicAuthHeader(connection_context, auth_header)) { |
| 753 | return false; |
| 754 | } |
| 755 | // Create a cookie to return. |
| 756 | connection_context->return_headers.push_back( |
| 757 | Substitute("Set-Cookie: $0", |
| 758 | GenerateCookie(connection_context->username, hash, |
| 759 | HTTP_AUTH_MECH_TRUSTED_HEADER))); |
| 760 | return true; |
| 761 | } |
| 762 | |
| 763 | bool BasicAuth(ThriftServer::ConnectionContext* connection_context, |
| 764 | const AuthenticationHash& hash, const string& base64) { |
nothing calls this directly
no test coverage detected