databrary-1: Databrary

Safe HaskellNone
LanguageHaskell2010

Model.Identity.Types

Synopsis

Documentation

data Identity Source #

Who is making the request that we are handling?

Constructors

NotLoggedIn

User may have an identity, but they have not established it yet

IdentityNotNeeded

We don't care what the user's identity is. Used mainly for BackgroundContext, but also used when running unprotected routes

Identified Session

An actual human user on a web browser. One of the other two return values for determineIdentity.

ReIdentified SiteAuth

Speculation: used in video conversion when sending results from the compute cluster back to the system. Used as a su to run actions as the account who created the upload asset, instead of the anonymous account submitting the result?

Instances

Has Access Identity Source # 

Methods

view :: Identity -> Access Source #

Has SiteAuth Identity Source #

Get the SiteAuth for the Identity, which corresponds to what privileges the Identity has within the site as well which Party/Account the Identity is

Has Party Identity Source # 

Methods

view :: Identity -> Party Source #

Has Identity SolrIndexingContext Source # 
Has Identity BackgroundContext Source # 
Has (Id Party) Identity Source # 

Methods

view :: Identity -> Id Party Source #

type MonadHasIdentity c m = (MonadHas Identity c m, Has SiteAuth c, Has Party c, Has (Id Party) c, Has Access c) Source #

Used by an action that will reference the actor's identity in order to authorize the action being performed. In some cases, this identity simply hasn't been established or was not resolved because the context indicated that an identity wasn't needed.

extractFromIdentifiedSessOrDefault :: a -> (Session -> a) -> Identity -> a Source #

Extract a value from part of a session for Identified, otherwise use the default value

identityVerf :: Identity -> Maybe ByteString Source #

Extract the secure token for state changing action, only available for logged in session identity