Slide 77
Slide 77 text
認証用のHTTP
サーバを作る
my $app = sub {
my $env = shift; my $req = Plack::Request->new($env);
# some authentication processes
my $endpoint = $req->header("X-Kuiperbelt-Endpoint");
my $session_id = generate_uuid();
$KVS->set("$user_id:kuiperbelt_session",
{ session => $session_id, endpoint => $endpoint });
return [200,
[
"Content-Type" => "application/json",
"X-Kuiperbelt-Session" => $session_id,
],
['{"message": "Hello WebSocket World!"}'],