public final class SecureQueuedStorage extends QueuedStorage implements SecureStorage
QueuedStorage
. I.e. its delegate is an instance of
SecureStorage
.SecureStorage
,
QueuedStorage
delegate, executor, fileExecutor, isBackingStorageInProxy, isTimedStatements, perfLogFormatter
Constructor and Description |
---|
SecureQueuedStorage(SecureStorage storage) |
SecureQueuedStorage(SecureStorage storage,
com.redhat.thermostat.shared.perflog.PerformanceLogFormatter logger) |
Modifier and Type | Method and Description |
---|---|
AuthToken |
generateToken(String actionName)
Generates a token in the storage that can be used to authenticate cmd
channel requests.
|
boolean |
verifyToken(AuthToken token,
String actionName)
Verifies the specified token and action in the storage.
|
getConnection, loadFile, prepareStatement, purge, registerCategory, saveFile, shutdown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConnection, loadFile, prepareStatement, purge, registerCategory, saveFile, shutdown
public SecureQueuedStorage(SecureStorage storage, com.redhat.thermostat.shared.perflog.PerformanceLogFormatter logger)
public SecureQueuedStorage(SecureStorage storage)
public AuthToken generateToken(String actionName) throws StorageException
SecureStorage
generateToken
in interface SecureStorage
actionName
- A unique name of the type of action to be performed.StorageException
- if authentication fails at this pointpublic boolean verifyToken(AuthToken token, String actionName)
SecureStorage
verifyToken
in interface SecureStorage
token
- The token to be verified.actionName
- A unique name of the type of action to be performed. This
action name is used during verification. This means if
verification succeeds, the given action name can be trusted
and may be used for authorization checks.true
if authentication succeeded, false
otherwiseCopyright © 2017. All rights reserved.