Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data LdapConf = LdapConf {}
- data LdapFilterAttr = LdapFilterAttr {}
- data LdapSearch = LdapSearch {}
- data Codec
- data ScimConf = ScimConf {}
- data BridgeConf = BridgeConf {
- ldapSource :: LdapConf
- scimTarget :: ScimConf
- mapping :: Mapping
- logLevel :: Level
- data MappingError
- data FieldMapping = FieldMapping {
- fieldMappingLabel :: Text
- fieldMappingFun :: [Text] -> Either MappingError (User ScimTag -> User ScimTag)
- data ScimTag
- newtype Mapping = Mapping {
- fromMapping :: Map Text [FieldMapping]
- type LdapResult a = IO (Either LdapError a)
- ldapObjectClassFilter :: Text -> Filter
- listLdapUsers :: LdapConf -> LdapSearch -> LdapResult [SearchEntry]
- type User = User ScimTag
- type StoredUser = StoredUser ScimTag
- emptyScimUser :: User
- scimSchemas :: [Schema]
- ldapToScim :: forall m. m ~ Either [(SearchEntry, MappingError)] => BridgeConf -> SearchEntry -> m (SearchEntry, User)
- connectScim :: ScimConf -> IO ClientEnv
- isDeletee :: LdapConf -> SearchEntry -> Bool
- updateScimPeer :: Logger -> BridgeConf -> IO ()
- lookupScimByExternalId :: ClientEnv -> Maybe Text -> User tag -> IO (Maybe StoredUser)
- updateScimPeerPostPut :: Logger -> ClientEnv -> Maybe (AuthData ScimTag) -> [User] -> IO ()
- updateScimPeerPostPutStep :: Logger -> ClientEnv -> Maybe Text -> User ScimTag -> Text -> IO ()
- updateScimPeerDelete :: Logger -> ClientEnv -> Maybe (AuthData ScimTag) -> [User] -> IO ()
- parseCli :: IO BridgeConf
- type Logger = Level -> Text -> IO ()
- mkLogger :: Level -> IO Logger
- main :: IO ()
Documentation
LdapConf | |
|
data LdapFilterAttr Source #
Instances
data LdapSearch Source #
LdapSearch | |
|
Instances
Eq LdapSearch Source # | |
Defined in LdapScimBridge (==) :: LdapSearch -> LdapSearch -> Bool # (/=) :: LdapSearch -> LdapSearch -> Bool # | |
Show LdapSearch Source # | |
Defined in LdapScimBridge showsPrec :: Int -> LdapSearch -> ShowS # show :: LdapSearch -> String # showList :: [LdapSearch] -> ShowS # | |
FromJSON LdapSearch Source # | |
Defined in LdapScimBridge parseJSON :: Value -> Parser LdapSearch # parseJSONList :: Value -> Parser [LdapSearch] # |
Instances
Eq ScimConf Source # | |
Show ScimConf Source # | |
Generic ScimConf Source # | |
FromJSON ScimConf Source # | |
type Rep ScimConf Source # | |
Defined in LdapScimBridge type Rep ScimConf = D1 ('MetaData "ScimConf" "LdapScimBridge" "ldap-scim-bridge-0.1-IIuup4792nj9EOQT6kchJF" 'False) (C1 ('MetaCons "ScimConf" 'PrefixI 'True) ((S1 ('MetaSel ('Just "scimTls") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "scimHost") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :*: (S1 ('MetaSel ('Just "scimPort") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "scimPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "scimToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))))) |
data BridgeConf Source #
BridgeConf | |
|
Instances
Generic BridgeConf Source # | |
Defined in LdapScimBridge type Rep BridgeConf :: Type -> Type # from :: BridgeConf -> Rep BridgeConf x # to :: Rep BridgeConf x -> BridgeConf # | |
FromJSON BridgeConf Source # | |
Defined in LdapScimBridge parseJSON :: Value -> Parser BridgeConf # parseJSONList :: Value -> Parser [BridgeConf] # | |
type Rep BridgeConf Source # | |
Defined in LdapScimBridge type Rep BridgeConf = D1 ('MetaData "BridgeConf" "LdapScimBridge" "ldap-scim-bridge-0.1-IIuup4792nj9EOQT6kchJF" 'False) (C1 ('MetaCons "BridgeConf" 'PrefixI 'True) ((S1 ('MetaSel ('Just "ldapSource") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 LdapConf) :*: S1 ('MetaSel ('Just "scimTarget") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ScimConf)) :*: (S1 ('MetaSel ('Just "mapping") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Mapping) :*: S1 ('MetaSel ('Just "logLevel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Level)))) |
data MappingError Source #
Instances
Eq MappingError Source # | |
Defined in LdapScimBridge (==) :: MappingError -> MappingError -> Bool # (/=) :: MappingError -> MappingError -> Bool # | |
Show MappingError Source # | |
Defined in LdapScimBridge showsPrec :: Int -> MappingError -> ShowS # show :: MappingError -> String # showList :: [MappingError] -> ShowS # |
data FieldMapping Source #
FieldMapping | |
|
Instances
Show FieldMapping Source # | |
Defined in LdapScimBridge showsPrec :: Int -> FieldMapping -> ShowS # show :: FieldMapping -> String # showList :: [FieldMapping] -> ShowS # |
Instances
UserTypes ScimTag Source # | |
Defined in LdapScimBridge supportedSchemas :: [Schema] # | |
GroupTypes ScimTag Source # | |
Defined in LdapScimBridge | |
AuthTypes ScimTag Source # | |
type UserExtra ScimTag Source # | |
Defined in LdapScimBridge | |
type UserId ScimTag Source # | |
Defined in LdapScimBridge | |
type GroupId ScimTag Source # | |
Defined in LdapScimBridge | |
type AuthInfo ScimTag Source # | |
Defined in LdapScimBridge | |
type AuthData ScimTag Source # | |
Defined in LdapScimBridge |
Map attribute keys to functions from attribute values to changes to scim records. We'll start off with an empty scim record, and change it based on attributes we find that are listed in the mapping. Mappigns can fail, eg. if there is more than one attribute value for the attribute mapping to externalId.
ldapObjectClassFilter :: Text -> Filter Source #
listLdapUsers :: LdapConf -> LdapSearch -> LdapResult [SearchEntry] Source #
type StoredUser = StoredUser ScimTag Source #
emptyScimUser :: User Source #
the undefined
is ok, the mapping is guaranteed to contain a filler for this, or the
mapping parser would have failed.
scimSchemas :: [Schema] Source #
ldapToScim :: forall m. m ~ Either [(SearchEntry, MappingError)] => BridgeConf -> SearchEntry -> m (SearchEntry, User) Source #
updateScimPeer :: Logger -> BridgeConf -> IO () Source #
lookupScimByExternalId :: ClientEnv -> Maybe Text -> User tag -> IO (Maybe StoredUser) Source #
updateScimPeerPostPut :: Logger -> ClientEnv -> Maybe (AuthData ScimTag) -> [User] -> IO () Source #
updateScimPeerPostPutStep :: Logger -> ClientEnv -> Maybe Text -> User ScimTag -> Text -> IO () Source #
parseCli :: IO BridgeConf Source #