title: http4k Custom OAuth Authorization Server
description: Recipe for using http4k to create an authorization server that provides an *authorization code* access flow

### Gradle setup
```
    compile group: "org.http4k", name: "http4k-core", version: "3.112.2"
    compile group: "org.http4k", name: "http4k-security-oauth", version: "3.112.2"
```

For this example, you need to configure `OAuthServer` instance with the correct implementations of your login pages, generation of authentication codes and access tokens.

### Code [<img class="octocat" src="/img/octocat-32.png"/>](https://github.com/http4k/http4k/blob/master/src/docs/cookbook/custom_oauth_authorization_server/example.kt)
<script src="https://gist-it.appspot.com/https://github.com/http4k/http4k/blob/master/src/docs/cookbook/custom_oauth_authorization_server/example.kt"></script>

title: http4k Custom OAuth Authorization Server
description: Recipe for using http4k to create an authorization server that provides an *authorization code* access flow

### Gradle setup
```
    compile group: "org.http4k", name: "http4k-core", version: "3.112.2"
    compile group: "org.http4k", name: "http4k-security-oauth", version: "3.112.2"
```

For this example, you need to configure `OAuthServer` instance with the correct implementations of your login pages, generation of authentication codes and access tokens.

### Code [<img class="octocat" src="/img/octocat-32.png"/>](https://github.com/http4k/http4k/blob/master/src/docs/cookbook/basic_oauth_authorization_server/example.kt)
<script src="https://gist-it.appspot.com/https://github.com/http4k/http4k/blob/master/src/docs/cookbook/basic_oauth_authorization_server/example.kt"></script>

Fix OAuth Server cookbook code example link
Fix OAuth Server cookbook code example link
