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, createOrUpdateUser, escapeLDAP, isExtraAttribute, replacePermissionsForUser, replaceRolesForUser, replaceUserAttribute

Inherited Functions: addRole, addUser, assignRoleToUser, attributesForUser, authenticate, authorize, changePassword, duplicate, effectivePermissionsForUser, getUserAttribute, grantPermissionsToRole, grantPermissionsToUser, isA, permissionsForRole, permissionsForUser, referenceCount, release, removeRole, removeRoleFromUser, removeUser, removeUserAttribute, revokePermissionsFromRole, revokePermissionsFromUser, roleExists, roles, rolesForUser, setUserAttribute, type, uncacheUser, userExists, users

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;

createOrUpdateUser protected virtual

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

isExtraAttribute protected

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

replacePermissionsForUser protected virtual

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

replaceRolesForUser protected virtual

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

replaceUserAttribute protected virtual

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

Variables

_ldapParams protected

LDAPParams _ldapParams;

_logger protected

Poco::Logger & _logger;