UserProvisioningService
class UserProvisioningService extends LoggingService (View source)
User provisioning service for external authentication providers Supports both OIDC and SAML user provisioning and linking
Constants
| AUTH_METHOD_SQL |
Aliases kept for callers; {AuthMethod} owns the vocabulary. |
| AUTH_METHOD_LDAP |
|
| AUTH_METHOD_OIDC |
|
| AUTH_METHOD_SAML |
|
| private LINKABLE_AUTH_METHODS |
Methods with an identity link table; LDAP identity is the username itself. |
Properties
| protected Logger | $logger | from LoggingService |
Methods
Sync an already-matched user from external auth data. Identity fields, template mapping and group membership are driven by the auth method's config section; nothing is written when the data is unchanged.
Get the database username for a user ID Used to set correct session username when linking existing users
Clean up orphaned external authentication links This method finds and removes OIDC/SAML links that point to non-existent users
Details
__construct(PDO $connection, ConfigurationManager $configManager, Logger $logger)
No description
protected void
logDebug(string $message, array $context = [])
No description
protected void
logInfo(string $message, array $context = [])
No description
protected void
logWarning(string $message, array $context = [])
No description
protected void
logError(string $message, array $context = [])
No description
void
syncExistingUser(int $userId, UserInfoInterface $userInfo)
Sync an already-matched user from external auth data. Identity fields, template mapping and group membership are driven by the auth method's config section; nothing is written when the data is unchanged.
int|null
provisionUser(UserInfoInterface $userInfo, string $providerId)
No description
string|null
getDatabaseUsername(int $userId)
Get the database username for a user ID Used to set correct session username when linking existing users
array
cleanupOrphanedAuthLinks()
Clean up orphaned external authentication links This method finds and removes OIDC/SAML links that point to non-existent users