| A subclass of AuthorizationFactory for the default Yazd implementation. It makes an
SQL query to the Yazd user table to see if the supplied username and password
match a user record. If they do, the appropaite Authorization token is
returned. If no matching User record is found an UnauthorizedException is
thrown.
Because each call to createAuthorization(String, String) makes a database
connection, Authorization tokens should be cached whenever possible. When
using a servlet or JSP skins, a good method is to cache the token in the
session. The SkinUtils.getUserAuthorization() methods automatically handles
this logic.
If you wish to integrate Yazd with your own user system, you'll need to
either modify the class or provide your own implementation of the
AuthorizationFactory interface.
|