Plug into Web3Non-custodial wallet supporting hundreds of tokens across Bitcoin, Ethereum, Solana, ICP, and more.

Software developer bouncing between Ruby, Elixir, and Crystal. I like to tackle big problems and work on random projects. Many real world Phoenix applications use JWTs to handle authentication, but there are situations that still require being able to test session. This has traditionally been tedious in Elixir (see below). However, Plug has recently added functionality to make this very simple. It
In the previous article, we have implemented authentication solution. But we still have some spots to cover. Our users still can access every page even though they are not logged in. Today we will introduce some improvements in our authentication solution and do it by using the Plugs. Let’s get started. What is a Plug? Plugs are some sort of layers in a Phoenix application. Which can be injected i
Plug について説明します。 Plug とは Elixir の HTTP サーバの実装の1つです。 内部では Erlang の信頼できる HTTP サーバ Cowboy を利用してますが、アダプターを切り替えることで他のライブラリにもできます。1 2017年12月19日現在、Cowboy 2 に対応した 1.5.0-rc.0 が出ています。 が、rc.0 なので、ちゃんとした 1.5.0 がリリースされるまでは 1.4.3 を使っておくのが無難でしょう。 Phoenix との違い Phoenix は Plug を利用して作っています。 Phoenix に渡ってくる conn は Plug.Conn なので、Phoenix を弄るには Plug の知識が必要になってきます。 また、Phoenix はプラグのインターフェースである init/1 と call/2 をうまく扱えるようにしている
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く