hsoz-0.0.0.3: Iron, Hawk, Oz: Web auth protocols

Safe HaskellNone
LanguageHaskell2010

Network.Oz.Application

Description

Provides a Network.Wai Application for managing Oz tickets.

The Oz ticket endpoints can be run with Warp or embedded within another application.

Synopsis

Documentation

ozAuth :: OzServerOpts -> Middleware Source #

Network.Wai Middleware for Oz authentication. Resources can be selectively protected by applying ifRequest to the middleware.

data OzServerOpts Source #

Constructors

OzServerOpts 

Fields

type OzLoadApp = OzAppId -> IO (Either String OzApp) Source #

User-supplied function to look up an Oz app definition by its identifier.

type OzLoadGrant = OzGrantId -> IO (Either String (OzGrant, Maybe OzExt)) Source #

User-supplied function to look up an Oz grant by its identifier.

defaultOzServerOpts :: Key -> OzServerOpts Source #

An empty Oz endpoint configuration. The password should be set to something secret.

ozAppScotty :: OzServerOpts -> ScottyM () Source #

The Oz endpoints are actually implemented using Web.Scotty. This provides the ScottyM application which can be embedded within other Scotty apps.