Interface Impersonation
@ProviderType
public interface Impersonation
The
Impersonation maintains Principals that are allowed to
impersonate. Principals can be added or removed using
grantImpersonation(Principal) and
revokeImpersonation(Principal), respectively.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTest if the given subject (i.e.@NotNull PrincipalIteratorbooleangrantImpersonation(@NotNull Principal principal) booleanrevokeImpersonation(@NotNull Principal principal)
-
Method Details
-
getImpersonators
- Returns:
- An iterator over the
Principals that are allowed to impersonate theUserthisImpersonationobject has been created for. - Throws:
RepositoryException- If an error occurs.
-
grantImpersonation
- Parameters:
principal- The principal that should be allowed to impersonate theUserthisImpersonationhas been built for.- Returns:
- true if the specified
Principalhas not been allowed to impersonate before and if impersonation has been successfully granted to it, false otherwise. - Throws:
RepositoryException- If an error occurs.
-
revokeImpersonation
- Parameters:
principal- The principal that should no longer be allowed to impersonate.- Returns:
- If the granted impersonation has been successfully revoked for the given principal; false otherwise.
- Throws:
RepositoryException- If an error occurs.
-
allows
Test if the given subject (i.e. any of the principals it contains) is allowed to impersonate.- Parameters:
subject- to impersonate.- Returns:
- true if this
Impersonationallows the specified Subject to impersonate. - Throws:
RepositoryException- If an error occurs.
-