#include "auth.hpp"
#include <middlewares/auth.hpp>
namespace samples::grpc::auth::server {
Middleware::Middleware() = default;
auto it = metadata.find(kKey);
if (it == metadata.cend() || it->second != kCredentials) {
return context.
SetError(::grpc::Status{::grpc::StatusCode::PERMISSION_DENIED,
"Invalid credentials"});
}
}
}