zfcampus/zf-mvc-auth — pull request #6 by weierophinney (2013-10-29 20:50:21+00:00)
Title: Authorization enhancements

- Creates an AuthorizationInterface, with an `isAuthorized()` method; developers may implement this interface and assign their implementation to the `ZF\MvcAuth\Authorization\AuthorizationInterface` alias in order to provide custom authorization (or they can listen to the authorization service!).
- AclFactory now creates an AclAuthorization instance, which is an AuthorizationInterface implementation
- The DefaultAuthorizationListener now composes an AuthorizationInterface instance instead of an Acl instance
- Moved resource string building to a new listener, DefaultResourceResolverListener, which listens at high priority.
- The MvcAuthEvent now composes a "resource" member.
- Added a "deny_by_default" flag to the configuration; the AclAuthorizationFactory will now use that value to determine whether or not to create a blacklist ACL instead of a whitelist.
- Created "Unauthenticated" and "Unauthorized" listeners to listen on the various ".post" events; they introspect the MvcAuthEvent to determine if a 401 or 403 response is necessary, respectively.