---
lang: en
title: 'API docs: authentication.authenticationbindings.current_user'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.authentication.authenticationbindings.current_user.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/authentication](./authentication.md) &gt; [AuthenticationBindings](./authentication.authenticationbindings.md) &gt; [CURRENT\_USER](./authentication.authenticationbindings.current_user.md)

## AuthenticationBindings.CURRENT\_USER variable

Key used to inject the user instance retrieved by the authentication function

<b>Signature:</b>

```typescript
CURRENT_USER: BindingKey<UserProfile | undefined>
```

## Example


```ts
class MyController {
  constructor(
    @inject(AuthenticationBindings.CURRENT_USER) private user: UserProfile,
  ) {}

// ... routes that may need authentication

```
}


