public interface PrivilegeHandler
| Modifier and Type | Method and Description |
|---|---|
Certificate |
authenticate(String username,
byte[] password)
Authenticate a user
|
PrivilegeContext |
getPrivilegeContext(Certificate certificate)
Returns the
PrivilegeContext for the given certificate |
PrivilegeHandler |
getPrivilegeHandler()
Returns the
PrivilegeHandler |
boolean |
invalidateSession(Certificate certificate)
Invalidates the given certificate
|
void |
isCertificateValid(Certificate certificate)
Validate that the certificate is still valid
|
void |
runAs(String username,
PrivilegedRunnable runnable)
Run the given
PrivilegedRunnable as the given system user |
void |
runAs(String username,
SystemAction action)
Run the given
SystemAction as the given system user |
void |
runAsAgent(PrivilegedRunnable runnable)
Run the given
PrivilegedRunnable as the system user StrolchConstants.SYSTEM_USER_AGENT |
void |
runAsAgent(SystemAction action)
Run the given
SystemAction as the system user StrolchConstants.SYSTEM_USER_AGENT |
<T> T |
runAsAgentWithResult(PrivilegedRunnableWithResult<T> runnable)
Run the given
PrivilegedRunnableWithResult as the system user StrolchConstants.SYSTEM_USER_AGENT |
<T> T |
runAsAgentWithResult(SystemActionWithResult<T> action)
Run the given
SystemActionWithResult as the system user StrolchConstants.SYSTEM_USER_AGENT |
<T> T |
runWithResult(String username,
PrivilegedRunnableWithResult<T> runnable)
Run the given
PrivilegedRunnable as the given system user |
<T> T |
runWithResult(String username,
SystemActionWithResult<T> action)
Run the given
SystemActionWithResult as the given system user |
boolean |
sessionTimeout(Certificate certificate)
Notifies that the session has timed out, i.e.
|
Certificate authenticate(String username, byte[] password)
username - the usernamepassword - the passwordPrivilegeHandler.authenticate(String, byte[])void isCertificateValid(Certificate certificate) throws PrivilegeException
certificate - the certificatePrivilegeException - if the certificate is not validPrivilegeHandler.isCertificateValid(Certificate)boolean invalidateSession(Certificate certificate)
certificate - the certificatePrivilegeHandler.invalidateSession(li.strolch.privilege.model.Certificate)boolean sessionTimeout(Certificate certificate)
certificate - the certificate that has timed outPrivilegeHandler.invalidateSession(li.strolch.privilege.model.Certificate)PrivilegeContext getPrivilegeContext(Certificate certificate) throws PrivilegeException
PrivilegeContext for the given certificatecertificate - the certificatePrivilegeContext for the given certificatePrivilegeException - if the certificate is not valid anymorePrivilegeHandler.getPrivilegeContext(li.strolch.privilege.model.Certificate)void runAs(String username, SystemAction action) throws PrivilegeException
SystemAction as the given system userusername - the system usernameaction - the action to performPrivilegeException - if there is something wrong<T> T runWithResult(String username, SystemActionWithResult<T> action) throws PrivilegeException
SystemActionWithResult as the given system userusername - the system usernameaction - the action to performPrivilegeException - if there is something wrongvoid runAs(String username, PrivilegedRunnable runnable) throws PrivilegeException
PrivilegedRunnable as the given system userusername - the system usernamerunnable - the runnable to performPrivilegeException - if there is something wrong<T> T runWithResult(String username, PrivilegedRunnableWithResult<T> runnable) throws PrivilegeException
PrivilegedRunnable as the given system userusername - the system usernamerunnable - the runnable to performPrivilegeException - if there is something wrongvoid runAsAgent(SystemAction action) throws PrivilegeException
SystemAction as the system user StrolchConstants.SYSTEM_USER_AGENTrunnable - the runnable to performPrivilegeException - if there is something wrong<T> T runAsAgentWithResult(SystemActionWithResult<T> action) throws PrivilegeException
SystemActionWithResult as the system user StrolchConstants.SYSTEM_USER_AGENTrunnable - the runnable to performPrivilegeException - if there is something wrongvoid runAsAgent(PrivilegedRunnable runnable) throws PrivilegeException
PrivilegedRunnable as the system user StrolchConstants.SYSTEM_USER_AGENTrunnable - the runnable to performPrivilegeException - if there is something wrong<T> T runAsAgentWithResult(PrivilegedRunnableWithResult<T> runnable) throws PrivilegeException
PrivilegedRunnableWithResult as the system user StrolchConstants.SYSTEM_USER_AGENTrunnable - the runnable to performPrivilegeException - if there is something wrongPrivilegeHandler getPrivilegeHandler()
PrivilegeHandlerPrivilegeHandlerCopyright © 2011–2016 Strolch. All rights reserved.