The Authorizable is the common base interface for {@link User} and{@link Group}. It provides access to the
Principals associated with an
Authorizable (see below) and allow to access and modify additional properties such as e.g. full name, e-mail or address.
Please note the difference between
Authorizable and {@link java.security.Principal Principal}:
An
Authorizable is repository object that is neither associated with nor depending from a particular
Session and thus independent of the login mechanisms creating
Sessions.
On the other hand
Principals are representations of user identities. In other words: each
Principal within the set associated with the Session's Subject upon login represents an identity for that user. An the set of
Principals may differ between different login mechanisms.
Consequently an one-to-many relationship exists between Authorizable and Principal (see also {@link #getPrincipal()}.
The interfaces derived from Authorizable are defined as follows:
- {@link User}: defined to be an Authorizable that can be authenticated (by using Credentials) and impersonated.
- {@link Group}: defined to be a collection of other
Authorizables.
@see User
@see Group