るりまサーチ

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

別のキーワード

  1. rexml/document new
  2. rexml/document write
  3. rexml/document node_type
  4. rexml/document to_s
  5. rexml/document clone

ライブラリ

キーワード

検索結果

WEBrick::HTTPAuth::BasicAuth#realm -> String (26117.0)

realm を文字列で返します。

...
realm
を文字列で返します。...

WEBrick::HTTPAuth::BasicAuth.make_passwd(realm, user, pass) -> String (8107.0)

pass をランダムなソルトで crypt した文字列を返します。

...pass をランダムなソルトで crypt した文字列を返します。

@param realm レルムを指定します。

@param user ユーザ名を指定します。

@param pass パスワードを指定します。...

WEBrick::HTTPAuth::BasicAuth (8024.0)

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

...HTTP の 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', 'supersecre...
...tpass')

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

WEBrick::HTTPAuth::BasicAuth.new(config, default = Config::BasicAuth) -> WEBrick::HTTPAuth::BasicAuth (8018.0)

BasicAuth オブジェクトを生成します。config は設定を保存したハッシュです。

...ハッシュです。

config で有効なハッシュキーは以下の通りです。

:Realm =>
:UserDB =>
:Logger =>
:AutoReloadUserDB =>

realm
を表す文字列 :Realm には与えます。:UserDB
には WEBrick::HTTPAuth::Htpasswd オブジェクトを与...