| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
LdapScimBridge
Synopsis
- data LdapConf = LdapConf {}
- data LdapFilterAttr = LdapFilterAttr {}
- data LdapSearch = LdapSearch {}
- data Codec
- data ScimConf = ScimConf {}
- data BridgeConf = BridgeConf {}
- newtype PhantomParent a = PhantomParent {
- unPhantomParent :: a
- data MappingError
- renderMappingError :: MappingError -> String
- renderSearchError :: [(SearchEntry, MappingError)] -> String
- 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
- ldapFilterAttrToFilter :: LdapFilterAttr -> Filter
- listLdapUsers :: LdapConf -> LdapSearch -> LdapResult [SearchEntry]
- type User = User ScimTag
- type StoredUser = StoredUser ScimTag
- emptyScimUser :: User
- scimSchemas :: [Schema]
- data RequireUserName
- ldapToScim :: forall m. m ~ Either [(SearchEntry, MappingError)] => RequireUserName -> BridgeConf -> SearchEntry -> m (SearchEntry, User)
- connectScim :: Logger -> 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
Constructors
| LdapConf | |
Fields
| |
data LdapFilterAttr Source #
Constructors
| LdapFilterAttr | |
Instances
data LdapSearch Source #
Constructors
| LdapSearch | |
Fields
| |
Instances
| FromJSON LdapSearch Source # | |
Defined in LdapScimBridge | |
| Show LdapSearch Source # | |
Defined in LdapScimBridge Methods showsPrec :: Int -> LdapSearch -> ShowS # show :: LdapSearch -> String # showList :: [LdapSearch] -> ShowS # | |
| Eq LdapSearch Source # | |
Defined in LdapScimBridge | |
Constructors
| ScimConf | |
Instances
| FromJSON ScimConf Source # | |
| Generic ScimConf Source # | |
| Show ScimConf Source # | |
| Eq ScimConf Source # | |
| type Rep ScimConf Source # | |
Defined in LdapScimBridge type Rep ScimConf = D1 ('MetaData "ScimConf" "LdapScimBridge" "ldap-scim-bridge-0.10-inplace" '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 #
Constructors
| BridgeConf | |
Fields
| |
Instances
| FromJSON BridgeConf Source # | |
Defined in LdapScimBridge | |
| Generic BridgeConf Source # | |
Defined in LdapScimBridge Associated Types type Rep BridgeConf :: Type -> Type # | |
| Show BridgeConf Source # | |
Defined in LdapScimBridge Methods showsPrec :: Int -> BridgeConf -> ShowS # show :: BridgeConf -> String # showList :: [BridgeConf] -> ShowS # | |
| type Rep BridgeConf Source # | |
Defined in LdapScimBridge type Rep BridgeConf = D1 ('MetaData "BridgeConf" "LdapScimBridge" "ldap-scim-bridge-0.10-inplace" '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 (PhantomParent Level))))) | |
newtype PhantomParent a Source #
Work around orphan instances. Might not be a phantom, but I like the name. :)
Constructors
| PhantomParent | |
Fields
| |
Instances
data MappingError Source #
Constructors
| MissingMandatoryValue Text Text | |
| WrongNumberOfAttrValues Text Text String Int | |
| CouldNotParseEmail Text Text Text String |
Instances
| Eq MappingError Source # | |
Defined in LdapScimBridge | |
renderSearchError :: [(SearchEntry, MappingError)] -> String Source #
data FieldMapping Source #
Constructors
| FieldMapping | |
Fields
| |
Instances
| Show FieldMapping Source # | |
Defined in LdapScimBridge Methods showsPrec :: Int -> FieldMapping -> ShowS # show :: FieldMapping -> String # showList :: [FieldMapping] -> ShowS # | |
Fill in the parameters for hscim User type with plausible defaults. (You may want to
touch this if you're using the library for something new.)
Instances
| AuthTypes ScimTag Source # | |
| GroupTypes ScimTag Source # | |
Defined in LdapScimBridge | |
| UserTypes ScimTag Source # | |
Defined in LdapScimBridge Methods supportedSchemas :: [Schema] # | |
| type AuthData ScimTag Source # | |
Defined in LdapScimBridge | |
| type AuthInfo ScimTag Source # | |
Defined in LdapScimBridge | |
| type GroupId ScimTag Source # | |
Defined in LdapScimBridge | |
| type UserExtra ScimTag Source # | |
Defined in LdapScimBridge | |
| type UserId 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.
Constructors
| Mapping | |
Fields
| |
Instances
ldapObjectClassFilter :: Text -> Filter Source #
listLdapUsers :: LdapConf -> LdapSearch -> LdapResult [SearchEntry] Source #
type StoredUser = StoredUser ScimTag Source #
emptyScimUser :: User Source #
Note that the userName field is mandatory in SCIM, but we gloss over this by setting it
to an empty Text here. See RequireUserName, ldapToScim if you wonder whether this is a
good idea.
scimSchemas :: [Schema] Source #
data RequireUserName Source #
Instances
| Show RequireUserName Source # | |
Defined in LdapScimBridge Methods showsPrec :: Int -> RequireUserName -> ShowS # show :: RequireUserName -> String # showList :: [RequireUserName] -> ShowS # | |
| Eq RequireUserName Source # | |
Defined in LdapScimBridge Methods (==) :: RequireUserName -> RequireUserName -> Bool # (/=) :: RequireUserName -> RequireUserName -> Bool # | |
ldapToScim :: forall m. m ~ Either [(SearchEntry, MappingError)] => RequireUserName -> 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 #