# Easy custom auth in Clojure with Friend

DevFeed: [Easy custom auth in Clojure with Friend](<https://devfeed.tech/articles/easy-custom-auth-in-clojure-with-friend-32119.md>)

Original publisher: [Read original article](<https://adambard.com/blog/easy-auth-with-friend/>)

Published: 2015-06-10T00:00:00Z

Content type: tutorial

Language: en

Sources: [Adam Bard](<https://devfeed.tech/sources/adam-bard.md>)

Topics: [Clojure](<https://devfeed.tech/topics/clojure.md>), [Authentication](<https://devfeed.tech/topics/authentication.md>), [Code](<https://devfeed.tech/topics/code.md>), [function](<https://devfeed.tech/topics/function.md>), [middleware](<https://devfeed.tech/topics/middleware.md>)

Tags: [auth](<https://devfeed.tech/tags/auth.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [clojure](<https://devfeed.tech/tags/clojure.md>), [code](<https://devfeed.tech/tags/code.md>), [function](<https://devfeed.tech/tags/function.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [password](<https://devfeed.tech/tags/password.md>)

## AI overview

This tutorial explains how to use Friend for simple custom authentication workflows in Clojure. It introduces Friend's middleware and workflow concepts, then uses a toy authentication system to illustrate how requests can produce a response, continue to another workflow, or authenticate a user.

## Source excerpt

I've used friend to provide auth in my projects a few times, and considered it many more before resorting to my own hand-rolled business. Most of the reason for this is that is just seems so complicated. Workflows? Credentials? I just want to check a password and stash a user object in the session, end of story. After I did some investigating, though, it turns out that you can usefully deploy friend for even very simple workflows, if you understand how it works.