るりまサーチ

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

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. t61string new
  4. matrix t
  5. fiddle type_intptr_t

検索結果

WEBrick::HTTPAuth::Authenticator#userdb -> WEBrick::HTTPAuth::Htpasswd | WEBrick::HTTPAuth::Htdigest (24301.0)

認証のためのユーザデータベースを返します。

...認証のためのユーザデータベースを返します。

@see WEBrick::HTTPAuth::BasicAuth, WEBrick::HTTPAuth::Htdigest...

WEBrick::HTTPAuth::BasicAuth (6018.0)

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

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



require 'webrick'
realm = "WEBrick's realm"
srv = WEBrick::HTTPServer.new({ :BindAddress => '127.0.0.1', :Port => 10080})

htpd = WEBrick::HTTPAuth::Htpasswd.new('dot.htpasswd')
htpd.set_passwd(nil, 'username', 'supersecret...
...pass')

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...