Poco::OSP::Auth

class AbstractLDAPAuthAdminService

Library: OSP
Package: Auth
Header: Poco/OSP/Auth/AbstractLDAPAuthAdminService.h

Description

This abstract class implements basic LDAP authentication.

Inheritance

Direct Base Classes: AuthAdminService

All Base Classes: AuthAdminService, AuthService, Poco::OSP::Service, Poco::RefCountedObject

Member Summary

Member Functions: authenticateLDAP, createOrUpdateUserImpl, escapeLDAP, isExtraAttribute, replacePermissionsForUserImpl, replaceRolesForUserImpl, replaceUserAttributeImpl

Inherited Functions: addRole, addUser, assignRoleToUser, attributesForUser, authenticate, authorize, changePassword, duplicate, effectivePermissionsForUser, findUsersByAttribute, getUserAttribute, grantPermissionsToRole, grantPermissionsToUser, isA, permissionsForRole, permissionsForUser, referenceCount, release, removeRole, removeRoleFromUser, removeUser, removeUserAttribute, replacePermissionsForRole, replacePermissionsForUser, replaceRolesForUser, replaceUserAttributes, revokePermissionsFromRole, revokePermissionsFromUser, roleExists, roles, rolesForUser, setUserAttribute, type, uncacheUser, userExists, users, usersWithAttribute, usersWithName, usersWithPermission, usersWithRole

Nested Classes

struct LDAPParams

LDAP authentication parameters. more...

Constructors

AbstractLDAPAuthAdminService

AbstractLDAPAuthAdminService(
    Poco::Logger & logger,
    const LDAPParams & ldapParams
);

Creates the AbstractLDAPAuthAdminService using the given LDAP parameters.

Note: if ldapParams.uri is empty, LDAP authentication will be disabled.

Destructor

~AbstractLDAPAuthAdminService virtual

~AbstractLDAPAuthAdminService();

Destroys the AuthAdminServiceImpl.

Member Functions

escapeLDAP static

static std::string escapeLDAP(
    const std::string & str
);

Escapes the given string according to LDAP rules.

authenticateLDAP protected

bool authenticateLDAP(
    const std::string & username,
    const std::string & credentials
) const;

createOrUpdateUserImpl protected virtual

virtual void createOrUpdateUserImpl(
    const std::string & username,
    const std::string & credentials
) const = 0;

isExtraAttribute protected

bool isExtraAttribute(
    const std::string & attr,
    std::string & canonicalAttr
) const;

replacePermissionsForUserImpl protected virtual

virtual void replacePermissionsForUserImpl(
    const std::string & username,
    const std::set < std::string > & permissions
) const = 0;

replaceRolesForUserImpl protected virtual

virtual void replaceRolesForUserImpl(
    const std::string & username,
    const std::set < std::string > & permissions
) const = 0;

replaceUserAttributeImpl protected virtual

virtual void replaceUserAttributeImpl(
    const std::string & username,
    const std::string & attribute,
    const std::string & value
) const = 0;

Variables

_ldapParams protected

LDAPParams _ldapParams;

_logger protected

Poco::Logger & _logger;