Skip to content

Commit 7f0015e

Browse files
authored
Merge pull request #71 from don-philipe/master
Fix authentication.md
2 parents 5cff880 + cef7e4a commit 7f0015e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/tutorial/authentication.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class AuthBearer(HttpBearer):
2323
class MyController:
2424
@route.get("/bearer", auth=AuthBearer())
2525
def bearer(self):
26-
return {"token": self.request.auth}
26+
return {"token": self.context.request.auth}
2727

2828
```
2929

@@ -73,7 +73,7 @@ class AuthBearer(AsyncHttpBearer):
7373
class MyController:
7474
@route.get("/bearer", auth=AuthBearer())
7575
async def bearer(self):
76-
return {"token": self.request.auth}
76+
return {"token": self.context.request.auth}
7777

7878
```
7979
In example above, we changed `HttpBearer` to `AsyncHttpBearer` and changed bearer to `async` endpoint.

0 commit comments

Comments
 (0)