# Class LittleGhost::Network::Decision

Documentation version: Edge

Canonical HTML: https://littleghostai.org/docs/LittleGhost/Network/Decision.html

Trusted authorization result and tightly scoped upstream header changes.

## Inheritance

`LittleGhost::Network::Decision < Data.define(:allowed, :status, :reason, :set_headers, :remove_headers)`

## Class methods

<a id="method-c-allow"></a>
### `.allow`

```ruby
.allow(set_headers: {}, remove_headers: [])
```

Allows a request and optionally changes its upstream headers.

<a id="method-c-deny"></a>
### `.deny`

```ruby
.deny(status: 403, reason: nil)
```

Rejects a request with an HTTP `status` and optional safe reason.

<a id="method-c-new"></a>
### `.new`

```ruby
.new(allowed:, status:, reason: nil, set_headers: {}, remove_headers: [])
```

Builds a normalized trusted authorization decision.
