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

Need to formalize sniffing/alteration of attrs #1

Open
mrclay opened this issue Apr 18, 2011 · 0 comments
Open

Need to formalize sniffing/alteration of attrs #1

mrclay opened this issue Apr 18, 2011 · 0 comments

Comments

@mrclay
Copy link
Owner

mrclay commented Apr 18, 2011

We don't want the SP or StateManager to take on responsibility for sniffing attributes already in $_SERVER (set by shibd), nor to hold business logic for altering attributes from an outside system, so we need dedicated components we can inject into the SP/IdP to handle this:

Interface Shibalike\Attr\ITransformer could specify an object responsible with modifying attributes from some source the following:

  • alter(array $source): returns array of attributes rewritten according to business logic. E.g. fixing string encoding problems, combining multiple attributes into a single one, filtering out certain attributes, replacing separator tokens.

Interface Shibalike\Attr\IDetector specify the following:

  • setSourceArray(array $source): used to pass in $_SERVER. This allows cleaner unit testing and should yield user code where it's clear where the data is coming from.
  • getAttrs(): returns array of attributes we care about from the source (after any needed transformation has been applied).
  • setTransformer(Shibalike\Attr\IDetector $transformer): an optional transform to apply before returning the attrs.
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