るりまサーチ

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

別のキーワード

  1. smtp authenticate
  2. imap authenticate
  3. net/smtp authenticate
  4. net/imap authenticate
  5. basicauth authenticate

ライブラリ

検索結果

WEBrick::HTTPAuth::BasicAuth (7.0)

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

...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 # http://127.0.0.1:10080/basic_auth...