るりまサーチ

最速Rubyリファレンスマニュアル検索!
744件ヒット [101-200件を表示] (0.040秒)
トップページ > クエリ: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 4 ... > >>

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

WEBrick::HTTPAuth::DigestAuth (3017.0)

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

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

2617 も参照してください。

例:
require 'webrick'
config = { :Realm => 'DigestAuth example realm' }

htdigest = WEBrick::HTTPAuth::Htdigest.new 'my_password_file'
htdigest.set_passwd config[:Realm], 'username', 'password'
htdi...
...gest.flush

config[:UserDB] = htdigest

digest_auth = WEBrick::HTTPAuth::DigestAuth.new config

サーブレットの initialize メソッドの中でこのクラスのインスタンスを作成
しないようにしてください。デフォルトでは WEBrick はリクエストのたびに...
...サー
ブレットのインスタンスを生成しますが、
WEBrick::HTTPAuth::DigestAuth のオブジェクトはリクエストをまたい
で利用しなければならないためです。...

WEBrick::HTTPAuth.#basic_auth(req, res, realm) {|user, pass| ... } -> nil (3002.0)

Basic 認証を行うためのメソッドです。

...からのリクエストを表す WEBrick::HTTPRequest オブジェクトを指定します。

@param res WEBrick::HTTPResponse オブジェクトを指定します。

@param realm 認証のレルムを文字列で指定します。

@raise WEBrick::HTTPStatus::Unauthorized 認証に失敗した...
...場合に発生します。

require 'webrick'
srv.mount_proc('/basic_auth') {|req, res|
HTTP
Auth.basic_auth(req, res, "WEBrick's realm") {|user, pass|
user == 'webrick' && pass == 'supersecretpassword'
}
res.body = "hoge"
}...

WEBrick::HTTPAuth.#proxy_basic_auth(req, res, realm) {|user, pass| ... } -> nil (3002.0)

プロクシの Basic 認証行うためのメソッドです。

...からのリクエストを表す WEBrick::HTTPRequest オブジェクトを指定します。

@param res WEBrick::HTTPResponse オブジェクトを指定します。

@param realm 認証のレルムを文字列で指定します。

@raise WEBrick::HTTPStatus::ProxyAuthenticationRequired 認証...

WEBrick::HTTPAuth::Authenticator (3001.0)

絞り込み条件を変える

WEBrick::HTTPAuth::Authenticator#logger -> object (3001.0)

ロガーオブジェクトを返します。

ロガーオブジェクトを返します。

WEBrick::HTTPAuth::Authenticator#realm -> String (3001.0)

レルムを返します。

レルムを返します。

WEBrick::HTTPAuth::Authenticator::AuthException -> Class (3001.0)

認証失敗時に発生する例外のクラスです。

認証失敗時に発生する例外のクラスです。

WEBrick::HTTPAuth::Authenticator::AuthScheme -> nil (3001.0)

認証方法を表わします。派生クラスで上書きしなければなりません。

認証方法を表わします。派生クラスで上書きしなければなりません。
<< < 1 2 3 4 ... > >>