Skip to content

Latest commit

 

History

History
93 lines (67 loc) · 3.05 KB

README.md

File metadata and controls

93 lines (67 loc) · 3.05 KB

Border Patrol is a type-safe, immutable, functional Scala library built on top of Finagle that provides modular components useful for session management and authentication. This library is used at Lookout for single sign on with support for multiple authentication backends.

The original version (as a server) can be found here (nginx+lua): ngx_borderpatrol

Badges

Join the chat at https://gitter.im/lookout/borderpatrol Build Status Coverage Status

Modules

Border Patrol uses a multi-project structure and contains the following modules:

  • core - the core classes/functions
  • example - the demo app showing sessions and authentication for multiple services
  • auth - different authentication plugins for core auth
  • security - different security plugins, e.g. CSRF protection
  • server - a server composing these modules that can be configured

Installation

Every Border Patrol module is published at Bintray and SNAPSHOT builds are published to JFrog.

  • stable release (not officially available yet):
libraryDependencies ++= Seq(
  "com.lookout.borderpatrol" %% "[borderpatrol-module]" % "0.1.0"
)
  • SNAPSHOT release:
libraryDependencies ++= Seq(
  "com.lookout.borderpatrol" %% "[borderpatrol-module]" % "0.1.0-SNAPSHOT" changing()
)

Building Border Patrol

To build Border Patrol you should have sbt installed (prefer v0.13.8+). Run sbt, and then use any of the following commands:

  • compile: compile the code
  • project [project]: to switch projects, e.g. "project example"
  • console: launch a REPL
  • test: run the tests
  • unidoc: generate the documentation
  • scalastyle: run the style-checker on the code
  • validate: run tests, style-checker, and doc generation

Running the example

$ sbt
> project example
> run

Documentation

Contributing

We would love to make this better, so please help us!

  • Submit a PR including an issue label "easy"
  • Write ScalaDoc comments
  • Write tutorials and examples
  • Improve tests
  • Help with code review
  • Give it a star
  • Join us on IRC #borderpatrol on Freenode

License

We use the MIT License License