るりまサーチ

最速Rubyリファレンスマニュアル検索!
744件ヒット [1-100件を表示] (0.016秒)
トップページ > クエリ:HTTP[x] > ライブラリ:webrick/httpauth[x]

別のキーワード

  1. net/http get
  2. http get
  3. http start
  4. net/http start
  5. net/http post

検索結果

<< 1 2 3 ... > >>

WEBrick::HTTPAuth (6002.0)

ユーザ認証の機能を提供するモジュールです。

ユーザ認証の機能を提供するモジュールです。

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

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

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

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

WEBrick::HTTPAuth::BasicAuth#userdb -> WEBrick::HTTPAuth::Htpasswd (3101.0)

ユーザ名とパスワードを保存した WEBrick::HTTPAuth::Htpasswd オブジェクトを返します。

...ユーザ名とパスワードを保存した WEBrick::HTTPAuth::Htpasswd オブジェクトを返します。...

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

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

...表す文字列 :Realm には与えます。:UserDB
には WEBrick::HTTPAuth::Htpasswd オブジェクトを与えます。:Logger には
ロガーオブジェクトを与えます。また、:AutoReloadUserDB には
WEBrick::HTTPAuth::Htpasswd#get_passwd の
reload_db に渡す引数を与えます...

WEBrick::HTTPAuth::DigestAuth.new(config, default = WEBrick::Config::DigestAuth) -> WEBrick::HTTPAuth::DigestAuth (3101.0)

自身を初期化します。

自身を初期化します。

認証を実行するために、リクエスト間で状態を保存し、複数のリクエストに対
して同一のインスタンスを使用してください。

@param config 設定を保持しているハッシュを指定します。
:Realm と :UserDB は必ず指定しなければなりません。

@param default デフォルトは WEBrick::Config::DigestAuth です。

@see WEBrick::Config::DigestAuth

絞り込み条件を変える

WEBrick::HTTPAuth::Htdigest.new(path) -> WEBrick::HTTPAuth::Htdigest (3101.0)

Htdigest オブジェクトを生成します。

Htdigest オブジェクトを生成します。

@param path パスワードを保存するファイルのパスを与えます。

WEBrick::HTTPAuth::Htgroup.new(path) -> WEBrick::HTTPAuth::Htgroup (3101.0)

自身を初期化します。

自身を初期化します。

@param path ファイル名を指定します。

WEBrick::HTTPAuth::Htpasswd.new(path) -> WEBrick::HTTPAuth::Htpasswd (3101.0)

Htpasswd オブジェクトを生成します。

Htpasswd オブジェクトを生成します。

@param path パスワードを保存するファイルのパスを与えます。

WEBrick::HTTPAuth::BasicAuth (3023.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...
<< 1 2 3 ... > >>