- Dec 07, 2016
-
-
Andy Summers authored
Add `isMemberOf` attribute for Manifest group delivery This PR adds the `isMemberOf` Shib attribute to the `UserDetails` object. Please review: @ahoffmann @weizhong-wang @KJOYNER See merge request !13
-
Andy Summers authored
-
Andrew Hoffmann authored
Test all the things! This merge request improves the code coverage of the project's unit tests. I broke up this rather large set of changes into separate commits. See the individual commit messages for details. * 75773b6d - Use PHPUnit provided by Composer instead of downloading a PHAR * 737771f2 - Convert dashes to underscores when converting to HTTP headers * 08aaa966 - Group conditional logic for clarity * 1477621c - Create missing tests for PreauthUserDetailsProvider, introduce an EnvironmentHelper * b74fd618 - Federated preauth tests made consistent with new preauth tests, improved coverage, moved test data from JSON to source code * 09d36d36 - LocalUserDetailsProvider throws Exception if JSON is invalid, returns null if JSON is missing * d021fd72 - Verify missing attributes are set as false * e29430a9 - Docblock and PSR-2 formatting improvements ### PHP Trait In 1477621c, I introduced a lesser-known feature of PHP called a [trait](http://php.net/manual/en/language.oop5.traits.php). It allows one to "inject" common methods into any class without requiring inheritance. @andrew-summers @weizhong-wang @KJOYNER See merge request !12
-
Andrew Hoffmann authored
-
Andrew Hoffmann authored
-
- Dec 06, 2016
-
-
Andrew Hoffmann authored
This allows interoperability with windows
-
Andrew Hoffmann authored
-
Andrew Hoffmann authored
Switch to static calls of PHPUnit assertion methods
-
Andrew Hoffmann authored
-
Andrew Hoffmann authored
Renamed to follow class naming conventions. Pulled in new EnvironmentHelper to manage environment variables. Moved default test data from JSON file into source code so it’s easier to find. Reorganized/renamed tests to better describe their assertions.
-
Andrew Hoffmann authored
Introduce a `trait` that helps set environment variables when testing
-
Andrew Hoffmann authored
It may not be clear to the developer that `&&` takes precedence over `||`. This change was recommended by a code quality scan.
-
Andrew Hoffmann authored
Changed the signature to `public static` to expose this useful function to other classes. Provided a test.
-
Andrew Hoffmann authored
Specify an exact version of PHPUnit. Autoload test classes if developing.
-
- Dec 05, 2016
-
-
Andrew Hoffmann authored
Rename mapAttribute method to httpHeaderFromAttribute to better describe what it does Minor documentation improvements also included in this commit @weizhong-wang @andrew-summers See merge request !11
-
Andrew Hoffmann authored
Minor documentation improvements included in this commit.
-
Andrew Hoffmann authored
Sync composer.lock with composer.json Composer was complaining that composer.lock was out of date. @weizhong-wang @andrew-summers See merge request !10
-
Andrew Hoffmann authored
Composer was complaining that composer.lock was out of date.
-
- Nov 22, 2016
-
-
Andy Summers authored
Chore: replace EPPN with email This PR fixes an error in `PreauthUserDetailsProvider` where EPPN was being passed to the constructor in place of email, an artifact of the email attribute not being delivered by Shib until recently. Please review: @ahoffmann @weizhong-wang @KJOYNER See merge request !9
-
Andy Summers authored
- Nov 16, 2016
-
-
Andy Summers authored
-
Andy Summers authored
Add UDDS attribute and refactor Apologies for the large and hard to read PR--it should hopefully make the code more easy to read and navigate. This PR adds UDDS as an attribute for `UserDetails`, along with a new class, `PreauthUserDetailsProvider`, which is an implementation of `UserDetailsProvider` for UW-Madison login. Notable changes: 1. 'HTTP' is now assumed by default. This is the flag that can be passed to `Preauth` constructors for the 'HTTP' versions of attributes. Example: `wiscEduPVI` becomes `HTTP_WISCEDUPVI`. 2. `UserDetailsProvider` is an abstract class now, not an interface. 3. Constants used for header keys are much more consistent. Keys for UW-System login no longer have the `FED_` prefix and you will get the correct key for your particular implementation (`FederatedPreauth...` vs. `Preauth`) by using `static::<CONSTANT_NAME>`. *The only exception:* UWMSN and UW-System differ on their name for 'PVI'--UWMSN uses "PVI" and UW-System uses "SPVI", so `PVI` is only a constant in `PreauthUserDetailsProvider` while `FederatedPreauthUserDetailsProvider` has an `SPVI` constant. 4. *Namespace reorganization*. Rather than lumping everything into the `edu\wisc\doit` namespace, the namespace structure is now much more like [uw-spring-security](https://git.doit.wisc.edu/adi-ia/uw-spring-security). General classes now exist in the `edu\wisc\doit\uwphps` namespace, with `local` and `preauth` namespaces existing for the local and preauth implementations. This change necessitated the bump to 2.0.0. Please review: @ahoffmann @weizhong-wang @KJOYNER See merge request !8
-
Andy Summers authored
-
Andy Summers authored
-
- Nov 15, 2016
-
-
Andy Summers authored
-
Andy Summers authored
-
Andy Summers authored
-
- Jul 27, 2016
-
-
Andy Summers authored
Fix bug with non-HTTP Shib sessions being valid for HTTP sessions Previously, the `PreauthUserDetailsProvider` was only checking that a valid Shib session existed by looking for the regular or HTTP Shib session header. This check is now strengthened by validating the correct header exists for the correct instance. Also renamed and changed some things in the `Preauth` test--it's now called `HTTPPreauthUserDetailsProviderTest` to reflect the fact that it's only testing the HTTP version of `Preauth`. Along those same lines, the test user now uses the HTTP headers and has been renamed to `testuser_http.json`. Please review: @ahoffmann See merge request !7
-
Andy Summers authored
Previously, the `PreauthUserDetailsProvider` was only checking that a valid Shib session existed by looking for the regular or HTTP Shib session header. This check is now strengthened by validating the correct header exists for the correct instance.
-
- Jul 25, 2016
-
-
Andy Summers authored
Add test for user with no email Add a test to ensure `false` is returned for a user with no email logged in through Preauth (Shib). Please review: @ahoffmann See merge request !6
-
Andy Summers authored
-
- Jul 20, 2016
-
-
Andy Summers authored
-
Andy Summers authored
Remove tests from edu\wisc\doit namespace The tests were auto-added to the `edu\wisc\doit` namespace by IntelliJ, bundling them as a classes in our released package. Since downstream apps don't need to instantiate the tests, this removes them from the namespace. Please review: @ahoffmann See merge request !5
-
- Jul 18, 2016
-
-
Andy Summers authored
-
- Jul 15, 2016
-
-
Andy Summers authored
Fix typos `release` target will probably work better now. Please review: @ahoffmann See merge request !4
-
Andy Summers authored
-
Andy Summers authored
Prepare project for first release Add Composer and Phing metadata to prepare for first release. Please review: @ahoffmann See merge request !3
-
Andy Summers authored
-
- Jul 14, 2016
-
-
Andrew Hoffmann authored
Refactor uw-php-security to use 'Provider' classes After a discussion about the project's design and requirements moving forward, it was decided to refactor the project to remove `AttributeMapper` classes and have `Provider` classes handle attribute mapping as well as user loading. This also adds a third provider, `PreauthHTTPUserDetailsProvider`, which can be used in environments where Shibboleth attributes are sent as HTTP headers. Apologies for the big PR! Please review: @ahoffmann See merge request !2
-