public class StsPropertiesStorageManager extends Object implements StsStorageManager
| Constructor and Description |
|---|
StsPropertiesStorageManager(Path filePath)
Simple implementation of STSStorageManager which uses a properties file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEntry(String hostname,
long duration,
StsPolicy policy)
Adds an entry to the store, storing data in the backing properties file.
|
Optional<StsPolicy> |
getEntry(String hostname)
Gets an STS policy from the store, looking it up via hostname.
|
boolean |
hasEntry(String hostname)
Checks if a policy has been stored for the hostname.
|
void |
removeEntry(String hostname)
Deletes an entry from the store (used for 0 duration policies).
|
public void addEntry(@Nonnull String hostname, long duration, @Nonnull StsPolicy policy)
addEntry in interface StsStorageManagerhostname - the hostname (as sent in the SNI by the client)duration - the length (in seconds) until the expiry of this stored policypolicy - the STS policy instance, including all data sent from the server@Nonnull public Optional<StsPolicy> getEntry(@Nonnull String hostname)
getEntry in interface StsStorageManagerhostname - the hostname (as sent in the SNI by the client)public boolean hasEntry(@Nonnull String hostname)
hasEntry in interface StsStorageManagerhostname - the hostname to checkpublic void removeEntry(@Nonnull String hostname)
Implementers MUST ignore requests to remove entries that do not exist.
removeEntry in interface StsStorageManagerhostname - the hostname to remove the policy forCopyright © 2013–2019 Kitteh. All rights reserved.