Add registration and extension support for custom auth backends.
Review Request #5534 — Created Feb. 23, 2014 and submitted — Latest diff uploaded
The auth backend code now follows the same registration pattern used
throughout the codebase. Auth backends can be registered, unregistered,
iterated through, and looked up.A new requirement is that auth backends must have an ID. For
compatibility purposes, we assign an ID if one is not set when scanning
entry points, but all registrations going straight through the new
functions will require an ID set directly on the class.There's also a new
AuthBackendHook
for extensions, which will handle the
registration and unregistration for the extension.Documentation has been added for the new hooks, and the guide on writing
an auth backend has been updated as well.
Made use of this in an extension. When I enabled the extension, the auth
backend appeared in the list, and could be used. I was able to authenticate
with it. Disabling the extension removed it from the list.Built the docs.
Checked that the right backends were loading and being provided to templates.