FYI,
I'm building an app for a small business that uses google apps, and
I found some relevant PHP code by Andrew Peace, and I managed to
make it into a xataface auth module.
I'm pretty new to PHP, and this was a bit of a hack-and-slash effort,
but it seems to work now, after wrestling with redirect loops and such a few times.
https://bitbucket.org/DanC/hh-office/sr ... a44ae/Auth
It requires a corresponding getRoles (or getPermissions) delegate method.
https://bitbucket.org/DanC/hh-office/sr ... legate.php