るりまサーチ

最速Rubyリファレンスマニュアル検索!
48件ヒット [1-48件を表示] (0.093秒)
トップページ > クエリ:r[x] > クエリ:basic[x] > クエリ:authenticate[x]

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. fileutils cp_r
  5. fileutils rm_r

検索結果

WEBrick::HTTPAuth::BasicAuth#authenticate(request, response) -> bool (24301.0)

クライアントから送られてきたユーザ名とパスワードを認証します。 認証に失敗した場合は challenge を呼びます。

...敗した場合は challenge を呼びます。

@param request WEBrick::HTTPRequest のインスタンスを指定します。

@param response WEBrick::HTTPResponse のインスタンスを指定します。

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

WEBrick::HTTPAuth::BasicAuth (9034.0)

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

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



r
equire 'webrick'
r
ealm = "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', 'supersecretpa...
...ss')

authenticator = WEBrick::HTTPAuth::BasicAuth.new(:UserDB => htpd, :Realm => realm)
srv.mount_proc('/basic_auth') {|req, res|
authenticator.authenticate(req, res)
r
es.body = "hoge"
}
srv.start # http://127.0.0.1:10080/basic_auth...

WEBrick::HTTPAuth::BasicAuth#challenge(request, response) -> () (6216.0)

クライアントにパスワードを要求するためにレスポンスに WWW-Authenticate ヘッダを 設定し、例外 WEBrick::HTTPStatus::Unauthorized を投げます。

...クライアントにパスワードを要求するためにレスポンスに WWW-Authenticate ヘッダを
設定し、例外 WEBrick::HTTPStatus::Unauthorized を投げます。

@raise WEBrick::HTTPStatus::Unauthorized このメソッドを呼ぶと必ず発生します。...

WEBrick::HTTPProxyServer.new(config, default = WEBrick::Config::HTTP) -> WEBrick::HTTPProxyServer (3212.0)

プロクシオブジェクトを生成して返します。

...ram config 設定を保存したハッシュを指定します。
設定として有効なハッシュのキーとその値は WEBrick::HTTPServer.new と同じです。
それに加えて以下のキーが有効です。

: :ProxyAuthProc
プロクシ認証を行う Pr...
...proc.call(req, res) のように呼ばれます。
認証に失敗した場合 proc は適切な例外を発生させなければいけません。nil を指定した場合すべての接続を
受け付けます。デフォルトは nil です。通常は WEBrick::HTTPAuth::ProxyBasicAuth...
...EBrick::HTTPAuth::ProxyDigestAuth を使用します。
//emlist{
r
equire 'webrick'
r
equire 'webrick/httpproxy'
auth_proc = proc{|req, res|
unless c = req['proxy-authorization']
r
es['Proxy-Authenticate'] = 'Basic realm="WEBrick Proxy"'
r
aise WEBrick::HTTPStatus::ProxyAuthenticationRe...