---
id: authentication
title: "Authentication Example"
sidebar_label: "Authentication"
---

## Authentication Server Example

```scala mdoc:passthrough
import utils._
printSource("zio-http-example/src/main/scala/example/AuthenticationServer.scala")
```

## Authentication Client Example

```scala mdoc:passthrough
import utils._
printSource("zio-http-example/src/main/scala/example/AuthenticationClient.scala")
```

## Middleware Basic Authentication Example

```scala mdoc:passthrough
import utils._
printSource("zio-http-example/src/main/scala/example/BasicAuth.scala")
```
