| 1139 | } |
| 1140 | |
| 1141 | bool Webserver::TrustedDomainCheck(const string& origin, struct sq_connection* connection, |
| 1142 | struct sq_request_info* request_info) { |
| 1143 | if (!IsTrustedDomain(origin, FLAGS_trusted_domain, |
| 1144 | FLAGS_trusted_domain_strict_localhost)) { |
| 1145 | return false; |
| 1146 | } |
| 1147 | |
| 1148 | string err_msg; |
| 1149 | if (!GetUsernameFromAuthHeader(connection, request_info, err_msg)) { |
| 1150 | LOG(ERROR) << "Passed TrustedDomainCheck but " << err_msg; |
| 1151 | return false; |
| 1152 | } |
| 1153 | return true; |
| 1154 | } |
| 1155 | |
| 1156 | bool Webserver::JWTTokenAuth(const std::string& jwt_token, |
| 1157 | struct sq_connection* connection, struct sq_request_info* request_info) { |
nothing calls this directly
no test coverage detected