icepeak-0.7.4.0: A fast JSON document store with push notification support.
Safe HaskellNone
LanguageHaskell2010

AccessControl

Description

This module defines the kinds of permissions used in icepeak and provides functions checking for sufficient permissions for certain operations.

Synopsis

Documentation

data AccessMode Source #

Different modes for accessing the JSON store

Constructors

ModeRead 
ModeWrite 

Instances

Instances details
Bounded AccessMode Source # 
Instance details

Defined in AccessControl

Enum AccessMode Source # 
Instance details

Defined in AccessControl

Eq AccessMode Source # 
Instance details

Defined in AccessControl

Ord AccessMode Source # 
Instance details

Defined in AccessControl

Read AccessMode Source # 
Instance details

Defined in AccessControl

Show AccessMode Source # 
Instance details

Defined in AccessControl

ToJSON AccessMode Source # 
Instance details

Defined in AccessControl

FromJSON AccessMode Source # 
Instance details

Defined in AccessControl

data AuthPath Source #

Constructors

AuthPath 

Fields

Instances

Instances details
Eq AuthPath Source # 
Instance details

Defined in AccessControl

Ord AuthPath Source # 
Instance details

Defined in AccessControl

Read AuthPath Source # 
Instance details

Defined in AccessControl

Show AuthPath Source # 
Instance details

Defined in AccessControl

ToJSON AuthPath Source # 
Instance details

Defined in AccessControl

FromJSON AuthPath Source # 
Instance details

Defined in AccessControl

data IcepeakClaim Source #

Defines the structure of a JWT claim for Icepeak.

Constructors

IcepeakClaim 

Fields

type Path = [Text] Source #

allowEverything :: IcepeakClaim Source #

A claim that allows all operations.

isAuthorizedByClaim :: IcepeakClaim -> Path -> AccessMode -> Bool Source #

Check whether accessing the given path with the given mode is authorized by the supplied claim.