In the previous chapter the security system (which is based on the dependency injection system) was giving the path operation function a `token` as a `str`:
```Python hl_lines="10"
{!./src/security/tutorial001.py!}
```
But that is still not that useful.
Let's make it give us the current user.
## Create a user model
First, let's create a Pydantic user model.
The same way we use Pydantic to declare bodies, we can use it anywhere else:
```Python hl_lines="5 12 13 14 15 16"
{!./src/security/tutorial002.py!}
```
## Create a `get_current_user` dependency
Let's create a dependency `get_current_user`.
Remember that dependencies can have sub-dependencies?
The same as we were doing before in the path operation directly, our new dependency `get_current_user` will receive a `token` as a `str` from the sub-dependency `oauth2_scheme`:
You can now get the current user directly in the path operation functions and deal with the security mechanisms at the **Dependency Injection** level, using `Depends`.
You actually don't have users that log in to your application but robots, bots, or other systems, that have just an access token? Again, it all works the same.
Just use any kind of model, any kind of class, any kind of database that you need for your application. **FastAPI** has you covered with the dependency injection system.