improve docs
This commit is contained in:
parent
85f7364ed8
commit
e15cc1ac29
@ -15,11 +15,14 @@ This simple authentication service is meant to be dropped into a Rio application
|
|||||||
Instantiate the service, add it to the rio.App attachments and implement the following session hook:
|
Instantiate the service, add it to the rio.App attachments and implement the following session hook:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
async def on_session_start(s: rio.Session) -> None:
|
||||||
|
s.authentication_status = AuthenticationStatus(None, None)
|
||||||
|
|
||||||
authentication_service = FileBasedAuthenticationService("/path/to/pw_file.txt")
|
authentication_service = FileBasedAuthenticationService("/path/to/pw_file.txt")
|
||||||
rio.App(
|
rio.App(
|
||||||
[...]
|
[...]
|
||||||
default_attachments=[authentication_service],
|
default_attachments=[authentication_service],
|
||||||
on_session_start= lambda session: session.authentication_status = AuthenticationStatus(None, None)
|
on_session_start=on_session_start
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user