Interface Impersonation
- 
@ProviderType public interface ImpersonationTheImpersonationmaintains Principals that are allowed to impersonate. Principals can be added or removed usinggrantImpersonation(Principal)andrevokeImpersonation(Principal), respectively.- See Also:
 User.getImpersonation()
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanallows(@NotNull javax.security.auth.Subject subject)Test if the given subject (i.e.@NotNull PrincipalIteratorgetImpersonators()booleangrantImpersonation(@NotNull java.security.Principal principal)booleanrevokeImpersonation(@NotNull java.security.Principal principal) 
 - 
 
- 
- 
Method Detail
- 
getImpersonators
@NotNull @NotNull PrincipalIterator getImpersonators() throws javax.jcr.RepositoryException
- Returns:
 - An iterator over the 
Principals that are allowed to impersonate theUserthisImpersonationobject has been created for. - Throws:
 javax.jcr.RepositoryException- If an error occurs.
 
- 
grantImpersonation
boolean grantImpersonation(@NotNull @NotNull java.security.Principal principal) throws javax.jcr.RepositoryException- 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:
 javax.jcr.RepositoryException- If an error occurs.
 
- 
revokeImpersonation
boolean revokeImpersonation(@NotNull @NotNull java.security.Principal principal) throws javax.jcr.RepositoryException- 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:
 javax.jcr.RepositoryException- If an error occurs.
 
- 
allows
boolean allows(@NotNull @NotNull javax.security.auth.Subject subject) throws javax.jcr.RepositoryExceptionTest 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:
 javax.jcr.RepositoryException- If an error occurs.
 
 - 
 
 -