Skip to content

Populate attributes#7

Open
adamfranco wants to merge 4 commits intoPRayno:masterfrom
middlebury:populate_attributes
Open

Populate attributes#7
adamfranco wants to merge 4 commits intoPRayno:masterfrom
middlebury:populate_attributes

Conversation

@adamfranco
Copy link
Contributor

Hi @PRayno, here is a first pass at providing user attributes that might be contained in the CAS response as part of the CasUser object, to resolve #5.

In order to test this, I needed to add some unit tests and supporting files so that phpunit would run.

Also, in order for the attributes to be maintained so that they can be used on subsequent page-loads when CasUserProvider->loadUserByUsername() gets called, I needed to inject the Session service into the CasUserProvider. While is easy to do in an application's services.yml, I couldn't figure out a way to have that service injected in the PRaynoCasAuthExtension::load() method or other way that would just work without requiring the extra configuration step. As far as I can tell only the username gets automatically persisted in the session -- not the full user object, though maybe there is another way to tell Symfony to persist the full user object.

While this PR is currently operational, there could certainly be a better way to accomplish this goal.

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

Successfully merging this pull request may close these issues.

Add user attributes from CAS response

1 participant