# `Backplane.Oauth.Authorization.Code`
[🔗](https://github.com/gsmlg-opt/backplane/blob/v1.10.77/apps/backplane_oauth/lib/backplane/oauth/authorization/code.ex#L2)

Check against given params and return the corresponding code

# `authorize`

```elixir
@spec authorize(%{
  value: String.t(),
  redirect_uri: String.t(),
  client: Backplane.Oauth.Client.t(),
  code_verifier: String.t()
}) ::
  {:error,
   %Backplane.Oauth.Error{
     error: :invalid_code,
     error_description: String.t(),
     format: nil,
     redirect_uri: nil,
     state: term(),
     status: :bad_request
   }}
  | {:ok, Backplane.Oauth.Token.t()}
```

Authorize the code corresponding to the given params.

## Examples
    iex> authorize(value: "value", redirect_uri: "redirect_uri")
    {:ok, %Backplane.Oauth.Token{...}}

---

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