Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receive optional loadInfo keys from LDAP #12

Open
maxpower9000 opened this issue Dec 14, 2017 · 0 comments
Open

Receive optional loadInfo keys from LDAP #12

maxpower9000 opened this issue Dec 14, 2017 · 0 comments

Comments

@maxpower9000
Copy link

maxpower9000 commented Dec 14, 2017

Issue

In my project, I need additional keys from LDAP. The returned LDAP keys are hardcoded to the
predefined key-value-pairs as in UserInfoLoader. See code below or at UserInfoLoader:28

class UserInfoLoader extends BaseHandler
{
	public function __construct($loadInfo = NULL)
	{
		$this->loadInfo = is_array($loadInfo) ? $loadInfo : array(
			// Useful attributes
			'givenName' => 'firstName',
			'sn' => 'lastName',
			'name' => 'fullName',
                        // (more default attributes here ...)

			'initials' => 'initials',  // <-- more key(s) needed for my project
		);

Idea

Why not override or extend the $loadInfo on instantiation, so the contructor
either merges or overrides the defaults with the user defined key-value-pairs.
For example: pass the user parameters into Authenticator:88

$this->userInfoLoader = new UserInfoLoader( /* user input here */ );

Thank you for your great work!

@maxpower9000 maxpower9000 changed the title Option to set individual loadInfo Receive optional loadInfo keys from LDAP Dec 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant