Skip to content

JotunHuset/JotunServer-Authorization-CouchDB

Repository files navigation

JotunServer-Authorization-CouchDB

JotunServer-Authorization store using CouchDB as the backing store

Mac OS X Linux Apache 2

Example

First of all please take alook at JotunServer-Authorization plugin usage

At first you have to create a properties for CouchDB connection. You can find more information about CouchDB here. It could be like this:

let connectionProperties = ConnectionProperties(host: "127.0.0.1", port: 5984, secured: false, username: nil, password: nil)

So then you can create persistor

let usersProvider = JotunUsersStoreProvider(persistor: EventsPersistor(connectionProperties: connectionProperties))
router.all("api/your_end_point", middleware: TokenAuthMiddleware(userStore: usersProvider))

License

This library is licensed under Apache 2.0. Full license text is available in LICENSE.