るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.009秒)

別のキーワード

  1. webrick/httpauth/authenticator requestfield
  2. webrick/httpauth/authenticator authexception
  3. webrick/httpauth/authenticator responsefield
  4. authenticator realm
  5. authenticator userdb

ライブラリ

検索結果

WEBrick::HTTPAuth::BasicAuth (13.0)

HTTP の Basic 認証のためのクラスです。

...w('dot.htpasswd')
htpd.set_passwd(nil, 'username', 'supersecretpass')

authenticator
= WEBrick::HTTPAuth::BasicAuth.new(:UserDB => htpd, :Realm => realm)
srv.mount_proc('/basic_auth') {|req, res|
authenticator
.authenticate(req, res)
res.body = "hoge"
}
srv.start # htt...