=encoding euc-jp =head1 NAME =begin original LWP::Authen::Ntlm - Library for enabling NTLM authentication (Microsoft) in LWP =end original LWP::Authen::Ntlm - LWP で (Microsoft) NTLM 認証を有効にするライブラリ =head1 SYNOPSIS use LWP::UserAgent; use HTTP::Request::Common; my $url = 'http://www.company.com/protected_page.html'; # Set up the ntlm client and then the base64 encoded ntlm handshake message my $ua = new LWP::UserAgent(keep_alive=>1); $ua->credentials('www.company.com:80', '', "MyDomain\\MyUserCode", 'MyPassword'); $request = GET $url; print "--Performing request now...-----------\n"; $response = $ua->request($request); print "--Done with request-------------------\n"; if ($response->is_success) {print "It worked!->" . $response->code . "\n"} else {print "It didn't work!->" . $response->code . "\n"} =head1 DESCRIPTION =begin original C allows LWP to authenticate against servers that are using the NTLM authentication scheme popularized by Microsoft. This type of authentication is common on intranets of Microsoft-centric organizations. =end original C は、LWP で、Microsoft によって一般化された NTLM 認証スキームを使っているサーバーに対して認証できるようにします。 この認証は Microsoft 中心の組織のイントラネットでは一般的です。 =begin original The module takes advantage of the Authen::NTLM module by Mark Bush. Since there is also another Authen::NTLM module available from CPAN by Yee Man Chan with an entirely different interface, it is necessary to ensure that you have the correct NTLM module. =end original このモジュールは、Mark Bush による Authen::NTLM モジュールの利点を 使っています。 CPAN には、全く異なるインターフェスを持つ、 Yee Man Chan による Authen::NTLM モジュールも利用可能なので、 正しい NTLM モジュールを使っていることを確認する必要があります。 =begin original In addition, there have been problems with incompatibilities between different versions of Mime::Base64, which Bush's Authen::NTLM makes use of. Therefore, it is necessary to ensure that your Mime::Base64 module supports exporting of the encode_base64 and decode_base64 functions. =end original さらに、Bush による Authen::NTLM が使っている Mime::Base64 のバージョンによる 非互換性による問題もあります。 従って、Mime::Base64 が encode_base64 関数と decode_base64 関数の エクスポートに対応していることを確認する必要があります。 =head1 USAGE =begin original The module is used indirectly through LWP, rather than including it directly in your code. The LWP system will invoke the NTLM authentication when it encounters the authentication scheme while attempting to retrieve a URL from a server. In order for the NTLM authentication to work, you must have a few things set up in your code prior to attempting to retrieve the URL: =end original このモジュールはあなたのコードで直接使うのではなく、LWP を通して間接的に 使われます。 LWP システムは、サーバから URL を得ようとするときに NTLM 認証スキームに 遭遇すると、この認証を起動します。 NTLM 認証が動作するために、URL を得ようとする前にあなたのコードで いくつかのことを設定しておかなければなりません: =over 4 =item * =begin original Enable persistent HTTP connections =end original 永続的 HTTP 接続を有効にする =begin original To do this, pass the "keep_alive=>1" option to the LWP::UserAgent when creating it, like this: =end original これを行うには、以下のように、LWP::UserAgent を作るときに "keep_alive=>1" オプションを渡します: my $ua = new LWP::UserAgent(keep_alive=>1); =item * =begin original Set the credentials on the UserAgent object =end original UserAgent オブジェクトに認証情報を設定する =begin original The credentials must be set like this: =end original 認証情報は以下のようなものでなければなりません: $ua->credentials('www.company.com:80', '', "MyDomain\\MyUserCode", 'MyPassword'); =begin original Note that you cannot use the HTTP::Request object's authorization_basic() method to set the credentials. Note, too, that the 'www.company.com:80' portion only sets credentials on the specified port AND it is case-sensitive (this is due to the way LWP is coded, and has nothing to do with LWP::Authen::Ntlm) =end original 認証情報を設定するのに HTTP::Request オブジェクトの authorization_basic() メソッドは使えないことに注意してください。 また、'www.company.com:80' の部分は指定されたポートに対して認証情報が 設定され、さらに大文字小文字を区別することにも注意してください (これは LWP のコーディング方法によるもので、LWP::Authen::Ntlm からは どうしようもありません)。 =back =begin original If you run into trouble and need help troubleshooting your problems, try enabling LWP debugging by putting this line at the top of your code: =end original もし問題に直面して、問題解決の手助けが必要なら、あなたのコードの先頭に 以下の行を書いて、LWP デバッグモードを有効にしてみてください: use LWP::Debug qw(+); =begin original You should get copious debugging output, including messages from LWP::Authen::Ntlm itself. =end original LWP::Authen::Ntlm からのものを含む、大量のデバッグメッセージが出力されます。 =head1 AVAILABILITY =begin original General queries regarding LWP should be made to the LWP Mailing List. =end original LWP に関する一般的な質問は LWP メーリングリストで行われるべきです。 =begin original Questions specific to LWP::Authen::Ntlm can be forwarded to jtillman@bigfoot.com =end original LWP::Authen::Ntlm 固有の質問は jtillman@bigfoot.com に転送されます。 =head1 COPYRIGHT Copyright (c) 2002 James Tillman. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 SEE ALSO L, L, L. =begin meta Translated: Kentaro SHIRAKATA (5.813) =end meta