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

Add user attributes from CAS response #5

Open
adamfranco opened this issue Aug 30, 2016 · 1 comment · May be fixed by #7
Open

Add user attributes from CAS response #5

adamfranco opened this issue Aug 30, 2016 · 1 comment · May be fixed by #7

Comments

@adamfranco
Copy link
Contributor

While CAS Protocol 1.0 & 2.0 defined only a <cas:user> attribute as required in the authentication response, many CAS server implementations release additional attributes. This attribute release can inform the application of details like a user's name, email address, preferred locale, and group membership. The phpCAS library currently supports looking for additional attributes in the CAS response encoded in several common formats. Replicating this support in CasAuthBundle will open-up a number of options to applications using this bundle.

My read on the structure of the Symfony Authenticator/UserProvider/User system is that the proper place for attribute parsing and structuring would be in the CasUserProvider. The CasUserProvider would need access to the serviceValidate response XML though, so that would need to be provided to it by the CasAuthenticator prior to $userProvider->loadUserByUsername() being called. I'll have to investigate further how to properly expose a mechanism for passing data from the CasAuthenticator to the CasUserProvider that won't cause problems if there are multiple Authenticators or UserProviders configured into the application.

@adamfranco
Copy link
Contributor Author

More details on the new CAS-protocol 3.0 attribute format:
https://apereo.github.io/cas/4.2.x/protocol/CAS-Protocol-Specification.html#attributes-cas-30

@adamfranco adamfranco linked a pull request Sep 2, 2016 that will close this issue
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 a pull request may close this issue.

1 participant