Skip to content
Snippets Groups Projects
Commit a54f5cf2 authored by Andy Summers's avatar Andy Summers
Browse files

Update README

parent 06e1cdbb
No related branches found
No related tags found
1 merge request!2Refactor uw-php-security to use 'Provider' classes
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
uw-php-security is a PHP companion to [uw-spring-security](https://git.doit.wisc.edu/adi-ia/uw-spring-security) for Java. Its purpose is to ease development of PHP applications needing details about UW users provided through Shibboleth. uw-php-security is a PHP companion to [uw-spring-security](https://git.doit.wisc.edu/adi-ia/uw-spring-security) for Java. Its purpose is to ease development of PHP applications needing details about UW users provided through Shibboleth.
Like uw-spring-security, uw-php-security provides a class called `UWUserDetails` for easily accessing common UW user attributes. This model is provided to applications through a `UserDetailsService`, and uw-php-security provides implementations suitable for both local and preauth (Shibboleth) environments. Like uw-spring-security, uw-php-security provides a class called `UWUserDetails` for easily accessing common UW user attributes. This model is provided to applications through a `UserDetailsProvider`, and uw-php-security provides implementations suitable for both local and preauth (Shibboleth) environments.
```php ```php
<?php <?php
use edu\wisc\doit\PreauthUserDetailsService; // or LocalUserDetailsService for local development use edu\wisc\doit\PreauthUserDetailsProvider; // or LocalUserDetailsProvider for local development
... ...
$userDetailsService = new PreauthUserDetailsService(); $userDetailsProvider = new PreauthUserDetailsProvider();
$user = $userDetailsService->loadUser(); $user = $userDetailsProvider->loadUser();
if ($user == null) { if ($user == null) {
// handle error // handle error
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment