Package org.picketbox.plugins
Class PicketBoxProcessor
- java.lang.Object
-
- org.picketbox.plugins.PicketBoxProcessor
-
public class PicketBoxProcessor extends Object
Process the security annotations on a POJO.
Additionally, there are various useful methods such as
#getCallerPrincipal()
to get the authenticated principal,#getCallerSubject()
to get the authenticated subject and#getCallerRoles()
to get the roles for the authenticated subject.- Since:
- Feb 16, 2010
-
-
Constructor Summary
Constructors Constructor Description PicketBoxProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Principal
getCallerPrincipal()
Get the authenticated principalRoleGroup
getCallerRoles()
Get the caller rolesSubject
getCallerSubject()
Get the caller subjectvoid
process(Object pojo)
Process the POJO for security annotationsvoid
setSecurityInfo(String userName, Object credential)
Set the user name/ Credential
-
-
-
Method Detail
-
setSecurityInfo
public void setSecurityInfo(String userName, Object credential)
Set the user name/ Credential
In the case of X509 certificates, they can be passed as the Credential into this method.
- Parameters:
userName
-credential
-
-
getCallerPrincipal
public Principal getCallerPrincipal() throws PicketBoxProcessingException
Get the authenticated principal- Returns:
- Throws:
PicketBoxProcessingException
-
getCallerRoles
public RoleGroup getCallerRoles() throws PicketBoxProcessingException
Get the caller roles- Returns:
- Throws:
PicketBoxProcessingException
-
getCallerSubject
public Subject getCallerSubject() throws PicketBoxProcessingException
Get the caller subject- Returns:
- Throws:
PicketBoxProcessingException
-
process
public void process(Object pojo) throws LoginException, PicketBoxProcessingException
Process the POJO for security annotations- Parameters:
pojo
-- Throws:
PicketBoxProcessingException
LoginException
-
-