hscim-0.4.0.3: hscim json schema and server implementation
Safe HaskellSafe-Inferred
LanguageHaskell2010

Web.Scim.Server.Mock

Description

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

Documentation

data Mock Source #

Tag used in the mock server.

Instances

Instances details
AuthTypes Mock Source # 
Instance details

Defined in Web.Scim.Server.Mock

Associated Types

type AuthData Mock Source #

type AuthInfo Mock Source #

GroupTypes Mock Source # 
Instance details

Defined in Web.Scim.Server.Mock

Associated Types

type GroupId Mock Source #

UserTypes Mock Source # 
Instance details

Defined in Web.Scim.Server.Mock

Associated Types

type UserId Mock Source #

type UserExtra Mock Source #

AuthDB Mock TestServer Source # 
Instance details

Defined in Web.Scim.Server.Mock

GroupDB Mock TestServer Source # 
Instance details

Defined in Web.Scim.Server.Mock

UserDB Mock TestServer Source # 
Instance details

Defined in Web.Scim.Server.Mock

type AuthData Mock Source # 
Instance details

Defined in Web.Scim.Server.Mock

type AuthInfo Mock Source # 
Instance details

Defined in Web.Scim.Server.Mock

type AuthInfo Mock = ()
type GroupId Mock Source # 
Instance details

Defined in Web.Scim.Server.Mock

type GroupId Mock = Id
type UserExtra Mock Source # 
Instance details

Defined in Web.Scim.Server.Mock

type UserId Mock Source # 
Instance details

Defined in Web.Scim.Server.Mock

type UserId Mock = Id

newtype Id Source #

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.

Constructors

Id 

Fields

Instances

Instances details
FromJSON Id Source # 
Instance details

Defined in Web.Scim.Server.Mock

ToJSON Id Source # 
Instance details

Defined in Web.Scim.Server.Mock

Show Id Source # 
Instance details

Defined in Web.Scim.Server.Mock

Methods

showsPrec :: Int -> Id -> ShowS #

show :: Id -> String #

showList :: [Id] -> ShowS #

Eq Id Source # 
Instance details

Defined in Web.Scim.Server.Mock

Methods

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

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

Ord Id Source # 
Instance details

Defined in Web.Scim.Server.Mock

Methods

compare :: Id -> Id -> Ordering #

(<) :: Id -> Id -> Bool #

(<=) :: Id -> Id -> Bool #

(>) :: Id -> Id -> Bool #

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

max :: Id -> Id -> Id #

min :: Id -> Id -> Id #

Hashable Id Source # 
Instance details

Defined in Web.Scim.Server.Mock

Methods

hashWithSalt :: Int -> Id -> Int #

hash :: Id -> Int #

FromHttpApiData Id Source # 
Instance details

Defined in Web.Scim.Server.Mock

ToHttpApiData Id Source # 
Instance details

Defined in Web.Scim.Server.Mock

data TestStorage Source #

Constructors

TestStorage 

Instances

Instances details
AuthDB Mock TestServer Source # 
Instance details

Defined in Web.Scim.Server.Mock

GroupDB Mock TestServer Source # 
Instance details

Defined in Web.Scim.Server.Mock

UserDB Mock TestServer Source # 
Instance details

Defined in Web.Scim.Server.Mock

liftSTM :: MonadIO m => STM a -> m a Source #

hoistSTM :: (MFunctor t, MonadIO m) => t STM a -> t m a Source #

filterUser :: Filter -> User extra -> Either Text Bool Source #

Check whether a user satisfies the filter.

Returns Left if the filter is constructed incorrectly (e.g. tries to compare a username with a boolean).

TODO(arianvp): We need to generalise filtering at some point probably.