# `Backplane.Oauth.Openid.UserinfoApplication`
[🔗](https://github.com/gsmlg-opt/backplane/blob/v1.10.77/apps/backplane_oauth/lib/backplane/oauth/openid/applications/userinfo_application.ex#L1)

Implement this behaviour in the application layer of your OpenID Connect provider.
This behaviour gives all callbacks triggered invoking `Backplane.Oauth.Openid.userinfo/2` function.

# `unauthorized`

```elixir
@callback unauthorized(conn :: Plug.Conn.t(), error :: Backplane.Oauth.Error.t()) :: any()
```

This function will be triggered when request is unauthorized invoking `Backplane.Oauth.Openid.userinfo/2`

# `userinfo_fetched`

```elixir
@callback userinfo_fetched(conn :: Plug.Conn.t(), userinfo :: map()) :: any()
```

This function will be triggered in case of success invoking `Backplane.Oauth.Openid.userinfo/2`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
