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

Access token introspection

# `token`

```elixir
@spec token(request :: Backplane.Oauth.IntrospectRequest.t()) ::
  {:ok, token :: Backplane.Oauth.Token.t()}
  | {:error, error :: Backplane.Oauth.Error.t()}
```

Returns corresponding token for the given `Backplane.Oauth.IntrospectRequest`

Note : Invalid tokens returns an error `{:error, %Error{error: :invalid_access_token, ...}}`. That must be rescued to return `%{"active" => false}` in application implementation.
## Examples
    iex> token(%IntrospectRequest{
      client_id: "client_id",
      client_secret: "client_secret",
      token: "token"
    })
    {:ok, %Token{...}}

---

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