Safe Haskell | None |
---|---|
Language | GHC2021 |
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
Constructors
SimpleSP (ReaderT SimpleSPCtx (ExceptT SimpleError IO) a) |
Instances
data SimpleSPCtx Source #
Constructors
SimpleSPCtx | |
Fields
|
Instances
MonadReader SimpleSPCtx SimpleSP Source # | |
Defined in SAML2.WebSSO.API.Example Methods ask :: SimpleSP SimpleSPCtx # local :: (SimpleSPCtx -> SimpleSPCtx) -> SimpleSP a -> SimpleSP a # reader :: (SimpleSPCtx -> a) -> SimpleSP a # |
type RequestStore = Map (ID AuthnRequest) (Issuer, Time) Source #
type MonadApp (m :: Type -> Type) = (GetAllIdPs SimpleError m, SPHandler SimpleError m) Source #
runSimpleSP :: SimpleSPCtx -> SimpleSP a -> IO (Either SimpleError a) Source #
mkSimpleSPCtx :: Config -> [IdPConfig_] -> IO SimpleSPCtx Source #
simpleStoreID :: forall {k} m ctx (a :: k). (MonadIO m, MonadReader ctx m) => Lens' ctx (MVar (Map (ID a) Time)) -> ID a -> Time -> m () Source #
simpleUnStoreID :: forall {k} m ctx (a :: k). (MonadIO m, MonadReader ctx m) => Lens' ctx (MVar (Map (ID a) Time)) -> ID a -> m () 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 #
simpleStoreRequest :: (MonadIO m, MonadReader ctx m) => Lens' ctx (MVar RequestStore) -> ID AuthnRequest -> Issuer -> Time -> m () Source #
simpleStoreRequest' :: ID AuthnRequest -> (Issuer, Time) -> RequestStore -> RequestStore Source #
simpleUnStoreRequest :: (MonadIO m, MonadReader ctx m) => Lens' ctx (MVar RequestStore) -> ID AuthnRequest -> m () Source #
simpleGetIdpIssuer :: (MonadIO m, MonadReader ctx m, SP m) => Lens' ctx (MVar RequestStore) -> ID AuthnRequest -> m (Maybe Issuer) Source #
simpleGetIdpIssuer' :: ID AuthnRequest -> RequestStore -> Time -> Maybe Issuer Source #
simpleGetIdPConfigBy :: (MonadError (Error err) m, HasConfig m, Show a, Ord a) => m [IdPConfig_] -> (IdPConfig_ -> a) -> a -> m IdPConfig_ Source #
class SPStoreIdP err m => GetAllIdPs err (m :: Type -> Type) where Source #
Methods
getAllIdPs :: m [IdPConfig (IdPConfigExtra m)] Source #
Instances
GetAllIdPs SimpleError SimpleSP Source # | |
Defined in SAML2.WebSSO.API.Example Methods getAllIdPs :: SimpleSP [IdPConfig (IdPConfigExtra SimpleSP)] Source # | |
GetAllIdPs SimpleError TestSP Source # | |
Defined in SAML2.WebSSO.Test.Util.TestSP Methods getAllIdPs :: TestSP [IdPConfig (IdPConfigExtra TestSP)] Source # |
type SPAPI = (Header "Cookie" Cky :> Get '[HTML] LoginStatus) :<|> (("logout" :> ("local" :> GetRedir '[HTML] (WithCookieAndLocation ST))) :<|> ("logout" :> ("single" :> GetRedir '[HTML] (WithCookieAndLocation ST)))) Source #
data LoginStatus Source #
Constructors
NotLoggedIn [(ST, ST)] | |
LoggedInAs ST ST |
Instances
Show LoginStatus Source # | |
Defined in SAML2.WebSSO.API.Example Methods showsPrec :: Int -> LoginStatus -> ShowS # show :: LoginStatus -> String # showList :: [LoginStatus] -> ShowS # | |
Eq LoginStatus Source # | |
Defined in SAML2.WebSSO.API.Example | |
MimeRender HTML LoginStatus Source # | |
Defined in SAML2.WebSSO.API.Example Methods mimeRender :: Proxy HTML -> LoginStatus -> ByteString Source # |