saml2-web-sso-0.20: Library and example web app for the SAML Web-based SSO profile.
Safe HaskellNone
LanguageGHC2021

SAML2.WebSSO.API.Example

Description

This is a sample application composed of the end-points in SAML.WebSSO.API plus a minimum of functionality to make a running web application. Some parts of this module could be handy to build other apps, but it is more likely to serve as a tutorial.

Documentation

newtype SimpleSP a Source #

Instances

Instances details
MonadIO SimpleSP Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

Methods

liftIO :: IO a -> SimpleSP a #

Applicative SimpleSP Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

Methods

pure :: a -> SimpleSP a #

(<*>) :: SimpleSP (a -> b) -> SimpleSP a -> SimpleSP b #

liftA2 :: (a -> b -> c) -> SimpleSP a -> SimpleSP b -> SimpleSP c #

(*>) :: SimpleSP a -> SimpleSP b -> SimpleSP b #

(<*) :: SimpleSP a -> SimpleSP b -> SimpleSP a #

Functor SimpleSP Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

Methods

fmap :: (a -> b) -> SimpleSP a -> SimpleSP b #

(<$) :: a -> SimpleSP b -> SimpleSP a #

Monad SimpleSP Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

Methods

(>>=) :: SimpleSP a -> (a -> SimpleSP b) -> SimpleSP b #

(>>) :: SimpleSP a -> SimpleSP b -> SimpleSP b #

return :: a -> SimpleSP a #

HasConfig SimpleSP Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

HasCreateUUID SimpleSP Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

HasLogger SimpleSP Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

Methods

logger :: Level -> String -> SimpleSP () Source #

HasNow SimpleSP Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

MonadError SimpleError SimpleSP Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

MonadReader SimpleSPCtx SimpleSP Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

GetAllIdPs SimpleError SimpleSP Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

SPHandler SimpleError SimpleSP Source #

If you read the Config initially in IO and then pass it into the monad via Reader, you safe disk load and redundant debug logs.

Instance details

Defined in SAML2.WebSSO.API.Example

Associated Types

type NTCTX SimpleSP 
Instance details

Defined in SAML2.WebSSO.API.Example

Methods

nt :: NTCTX SimpleSP -> SimpleSP x -> Handler x Source #

SPStoreIdP SimpleError SimpleSP Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

Associated Types

type IdPConfigExtra SimpleSP 
Instance details

Defined in SAML2.WebSSO.API.Example

type IdPConfigSPId SimpleSP 
Instance details

Defined in SAML2.WebSSO.API.Example

SPStoreAssertion Assertion SimpleSP Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

SPStoreRequest AuthnRequest SimpleSP Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

type IdPConfigExtra SimpleSP Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

type IdPConfigSPId SimpleSP Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

type NTCTX SimpleSP Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

simpleStoreID :: forall {k} m ctx (a :: k). (MonadIO m, MonadReader ctx m) => Lens' ctx (MVar (Map (ID a) Time)) -> ID a -> Time -> m () Source #

simpleStoreID' :: forall {k} (a :: k). ID a -> Time -> Map (ID a) Time -> Map (ID a) Time Source #

simpleUnStoreID :: forall {k} m ctx (a :: k). (MonadIO m, MonadReader ctx m) => Lens' ctx (MVar (Map (ID a) Time)) -> ID a -> m () Source #

simpleUnStoreID' :: forall {k} (a :: k). ID a -> Map (ID a) Time -> Map (ID a) Time Source #

simpleIsAliveID :: forall {k} m ctx (a :: k). (MonadIO m, MonadReader ctx m, SP m) => Lens' ctx (MVar (Map (ID a) Time)) -> ID a -> m Bool Source #

simpleIsAliveID' :: forall {k} (a :: k). Time -> ID a -> Map (ID a) Time -> Bool Source #

simpleGetIdPConfigBy :: (MonadError (Error err) m, HasConfig m, Show a, Ord a) => m [IdPConfig_] -> (IdPConfig_ -> a) -> a -> m IdPConfig_ Source #

type SPAPI = (Header "Cookie" Cky :> Get '[HTML] LoginStatus) :<|> (("logout" :> ("local" :> GetRedir '[HTML] (WithCookieAndLocation ST))) :<|> ("logout" :> ("single" :> GetRedir '[HTML] (WithCookieAndLocation ST)))) Source #

type APPAPI = ("sp" :> SPAPI) :<|> ("sso" :> API) Source #

data LoginStatus Source #

Constructors

NotLoggedIn [(ST, ST)] 
LoggedInAs ST ST 

Instances

Instances details
Show LoginStatus Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

Eq LoginStatus Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

MimeRender HTML LoginStatus Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

data Path Source #

Instances

Instances details
Show Path Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

Methods

showsPrec :: Int -> Path -> ShowS #

show :: Path -> String #

showList :: [Path] -> ShowS #

Eq Path Source # 
Instance details

Defined in SAML2.WebSSO.API.Example

Methods

(==) :: Path -> Path -> Bool #

(/=) :: Path -> Path -> Bool #