hook.identitylocal

class immp.hook.identitylocal.IdentityGroup(*args, **kwargs)

Bases: immp.hook.database.BaseModel

Representation of a single identity.

instance

intIdentityHook instance code.

name

str – Unique display name.

pwd

str – Hashed password, used by the user to authenticate when linking identities.

.IdentityLink iterable – All links contained by this group.

Bases: immp.hook.database.BaseModel

Single link between an identity and a user.

group

.IdentityGroup – Containing group instance.

network

str – Network identifier that the user belongs to.

user

str – User identifier as given by the plug.

class immp.hook.identitylocal.IdentityRole(*args, **kwargs)

Bases: immp.hook.database.BaseModel

Assignment of a role to an identity.

group

.IdentityGroup – Containing group instance.

role

str – Plain role identifier.

class immp.hook.identitylocal.LocalIdentityHook(name, config, host)

Bases: immp.core.hook.Hook, immp.hook.access.AccessPredicate, immp.hook.identity.IdentityProvider

Hook for managing physical users with multiple logical links across different plugs. This effectively provides self-service identities, as opposed to being provided externally.

get(name)

Retrieve the identity group using the given name.

Parameters
name (str) – Existing name to query.
Returns
Linked identity, or None if not linked.
Return type
IdentityGroup
find(user)

Retrieve the identity that contains the given user, if one exists.

Parameters
user (User) – Existing user to query.
Returns
Linked identity, or None if not linked.
Return type
IdentityGroup