Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
A mock server for use in our testsuite, as well as for automated compliance testing (e.g. with Runscope – see https://developer.okta.com/standards/SCIM/#step-2-test-your-scim-server).
Synopsis
- data Mock
- newtype Id = Id {}
- type UserStorage = Map Id (StoredUser Mock)
- type GroupStorage = Map Id (StoredGroup Mock)
- data TestStorage = TestStorage {}
- emptyTestStorage :: IO TestStorage
- type TestServer = ReaderT TestStorage Handler
- liftSTM :: MonadIO m => STM a -> m a
- hoistSTM :: (MFunctor t, MonadIO m) => t STM a -> t m a
- assertMutability :: User Mock -> StoredUser Mock -> Bool
- testDate :: UTCTime
- createMeta :: ResourceType -> Meta
- nt :: TestStorage -> ScimHandler TestServer a -> Handler a
- filterUser :: Filter -> User extra -> Either Text Bool
Documentation
Tag used in the mock server.
Instances
A simple ID type.
>>>
eitherDecode' @Id . encode $ (Id 3)
Right (Id {unId = 3})
WARNING: {doctests don't work in our infrastructure](https:/github.comzinfrabackend-issuesissues/1549), so this is duplicated in the unit tests.
Instances
FromJSON Id Source # | |
ToJSON Id Source # | |
Defined in Web.Scim.Server.Mock | |
Show Id Source # | |
Eq Id Source # | |
Ord Id Source # | |
Hashable Id Source # | |
Defined in Web.Scim.Server.Mock | |
FromHttpApiData Id Source # | |
Defined in Web.Scim.Server.Mock parseUrlPiece :: Text -> Either Text Id # parseHeader :: ByteString -> Either Text Id # | |
ToHttpApiData Id Source # | |
Defined in Web.Scim.Server.Mock toUrlPiece :: Id -> Text # toEncodedUrlPiece :: Id -> Builder # toHeader :: Id -> ByteString # toQueryParam :: Id -> Text # toEncodedQueryParam :: Id -> Builder # |
type UserStorage = Map Id (StoredUser Mock) Source #
type GroupStorage = Map Id (StoredGroup Mock) Source #
data TestStorage Source #
Instances
type TestServer = ReaderT TestStorage Handler Source #
assertMutability :: User Mock -> StoredUser Mock -> Bool Source #
createMeta :: ResourceType -> Meta Source #
nt :: TestStorage -> ScimHandler TestServer a -> Handler a Source #