0

Python 2.7 で構築された単一ページ Web アプリケーションを使用しています。ユーザー名、パスワード、およびアプリにリダイレクトするログイン ボタンを含む簡単な認証ページを追加する必要があります。また、ログイン ページにリダイレクトするアプリ ページのログアウト ボタンも追加する必要があります。関係するユーザーと共有される単一のユーザー名とパスワードを使用します。wsgiref を使用します。

from wsgiref import simple_server

from someApp import SomeAPI

app = SomeAPI()

if __name__ == '__main__':

    httpd = simple_server.make_server('0.0.0.0', 8000, app)
    httpd.serve_forever()

falcon-auth やバレルなどのミドルウェア認証を使用しようとしています。インストール中にエラーが発生します。

C:\Users\User1>pip install falcon-auth
Collecting falcon-auth
c:\python27\lib\site-packages\pip\_vendor\urllib3\util\ssl_.py:339: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  SNIMissingWarning

私は最終的にエラーを取得します

Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLError(1, '_ssl.c:499: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)) - skipping

Python 2.7 を使用する必要があり、より高いバージョンにアップグレードする必要がないことを考えると、どのような解決策がありますか?

4

0 に答える 0