Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module defines the kinds of permissions used in icepeak and provides functions checking for sufficient permissions for certain operations.
Synopsis
- data AccessMode
- data AuthPath = AuthPath {}
- data IcepeakClaim = IcepeakClaim {}
- type Path = [Text]
- allowEverything :: IcepeakClaim
- accessModeToText :: AccessMode -> Text
- textToAccessMode :: Text -> Maybe AccessMode
- isAuthorizedByClaim :: IcepeakClaim -> Path -> AccessMode -> Bool
Documentation
data AccessMode Source #
Different modes for accessing the JSON store
Instances
AuthPath | |
|
data IcepeakClaim Source #
Defines the structure of a JWT claim for Icepeak.
IcepeakClaim | |
|
Instances
allowEverything :: IcepeakClaim Source #
A claim that allows all operations.
accessModeToText :: AccessMode -> Text Source #
textToAccessMode :: Text -> Maybe AccessMode Source #
isAuthorizedByClaim :: IcepeakClaim -> Path -> AccessMode -> Bool Source #
Check whether accessing the given path with the given mode is authorized by the supplied claim.