48件ヒット
[1-48件を表示]
(0.163秒)
別のキーワード
検索結果
先頭4件
-
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 オブジェクトを与...