Repository: bugov/aiohttp-basicauth-middleware

Issue:
example doesn't work. 
TypeError: basic_auth_middleware() missing 1 required positional argument: 'strategy'
```
from aiohttp import web
from aiohttp_basicauth_middleware import basic_auth_middleware
async def public_view(request):
    return web.Response(text='Public view')
async def secret_view(request):
    return web.Response(text='Secret view')
app = web.Application()
app.router.add_route('GET', '/public', public_view)
app.router.add_route('GET', '/secret', secret_view)
app.middlewares.append(
    basic_auth_middleware(
        ('/public',),
        {'user': 'password'},
    )
)
web.run_app(app, host='127.0.0.1', port=80)
```

Discussion:

Patch:
diff --git a/aiohttp_basicauth_middleware/__init__.py b/aiohttp_basicauth_middleware/__init__.py
index 23c5682..21c3a5b 100644
--- a/aiohttp_basicauth_middleware/__init__.py
+++ b/aiohttp_basicauth_middleware/__init__.py
@@ -27,7 +27,7 @@ from aiohttp import web
 from http_basic_auth import parse_header, BasicAuthException
 from aiohttp_basicauth_middleware.strategy import BaseStrategy
 
-__version__ = '1.1.0'
+__version__ = '1.1.1'
 
 log = logging.getLogger(__name__)
 
@@ -56,7 +56,7 @@ def check_access(
 def basic_auth_middleware(
     urls: Iterable,
     auth_dict: dict,
-    strategy: Type[BaseStrategy]
+    strategy: Type[BaseStrategy] = lambda x: x
 ) -> Coroutine:
     async def factory(app, handler) -> Coroutine:
         async def middleware(request) -> web.Response:


Test patch:
diff --git a/test/test_strategy.py b/test/test_strategy.py
index 74d138c..b192758 100644
--- a/test/test_strategy.py
+++ b/test/test_strategy.py
@@ -1,3 +1,6 @@
+from aiohttp import web
+
+from aiohttp_basicauth_middleware import basic_auth_middleware
 from http_basic_auth import generate_header
 
 from example.strategy import get_app
@@ -35,3 +38,36 @@ async def test_pass(aiohttp_server, aiohttp_client, loop):
         headers={'Authorization': generate_header('user', 'pass')},
     )
     assert response.status == 401
+
+
+async def test_no_strategy(aiohttp_server, aiohttp_client, loop):
+    async def public_view(request):
+        return web.Response(text='Public view')
+
+    async def secret_view(request):
+        return web.Response(text='Secret view')
+
+    app = web.Application()
+    app.router.add_route('GET', '/public', public_view)
+    app.router.add_route('GET', '/secret', secret_view)
+    app.middlewares.append(
+        basic_auth_middleware(
+            ('/secret',),
+            {'user': 'password'},
+        )
+    )
+
+    server = await aiohttp_server(app)
+    client = await aiohttp_client(server)
+
+    response = await client.get('/public')
+    assert response.status == 200
+
+    response = await client.get('/secret')
+    assert response.status == 401
+
+    response = await client.get(
+        '/secret',
+        headers={'Authorization': generate_header('user', 'password')},
+    )
+    assert response.status == 200