Class DosetaKeyRepository
- java.lang.Object
-
- org.jboss.resteasy.security.doseta.DosetaKeyRepository
-
- All Implemented Interfaces:
KeyRepository
public class DosetaKeyRepository extends Object implements KeyRepository
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
DosetaKeyRepository.CacheEntry<T>
-
Field Summary
Fields Modifier and Type Field Description protected long
cacheTimeout
protected String
defaultPrivateDomain
protected String
dnsUri
protected KeyStoreKeyRepository
keyStore
protected String
keyStoreFile
protected String
keyStorePassword
protected String
keyStorePath
protected ConcurrentHashMap<String,DosetaKeyRepository.CacheEntry<PrivateKey>>
privateCache
protected ConcurrentHashMap<String,DosetaKeyRepository.CacheEntry<PublicKey>>
publicCache
protected boolean
useDns
protected boolean
userPrincipalAsPrivateSelector
-
Constructor Summary
Constructors Constructor Description DosetaKeyRepository()
-
Method Summary
-
-
-
Field Detail
-
privateCache
protected ConcurrentHashMap<String,DosetaKeyRepository.CacheEntry<PrivateKey>> privateCache
-
publicCache
protected ConcurrentHashMap<String,DosetaKeyRepository.CacheEntry<PublicKey>> publicCache
-
keyStore
protected KeyStoreKeyRepository keyStore
-
defaultPrivateDomain
protected String defaultPrivateDomain
-
useDns
protected boolean useDns
-
userPrincipalAsPrivateSelector
protected boolean userPrincipalAsPrivateSelector
-
dnsUri
protected String dnsUri
-
cacheTimeout
protected long cacheTimeout
-
keyStorePath
protected String keyStorePath
-
keyStoreFile
protected String keyStoreFile
-
keyStorePassword
protected String keyStorePassword
-
-
Method Detail
-
start
public void start()
-
getDefaultPrivateSelector
public String getDefaultPrivateSelector()
Description copied from interface:KeyRepository
What should be the default selector to use when creating signature header- Specified by:
getDefaultPrivateSelector
in interfaceKeyRepository
- Returns:
- null if none
-
getKeyStorePath
public String getKeyStorePath()
-
setKeyStorePath
public void setKeyStorePath(String keyStorePath)
-
getKeyStoreFile
public String getKeyStoreFile()
-
setKeyStoreFile
public void setKeyStoreFile(String keyStoreFile)
-
getKeyStorePassword
public String getKeyStorePassword()
-
setKeyStorePassword
public void setKeyStorePassword(String keyStorePassword)
-
getKeyStore
public KeyStoreKeyRepository getKeyStore()
-
setKeyStore
public void setKeyStore(KeyStoreKeyRepository keyStore)
-
getDefaultPrivateDomain
public String getDefaultPrivateDomain()
Description copied from interface:KeyRepository
What should be the default domain to use when creating signature header- Specified by:
getDefaultPrivateDomain
in interfaceKeyRepository
- Returns:
- null if none
-
setDefaultPrivateDomain
public void setDefaultPrivateDomain(String defaultPrivateDomain)
-
isUseDns
public boolean isUseDns()
-
setUseDns
public void setUseDns(boolean useDns)
-
isUserPrincipalAsPrivateSelector
public boolean isUserPrincipalAsPrivateSelector()
-
setUserPrincipalAsPrivateSelector
public void setUserPrincipalAsPrivateSelector(boolean userPrincipalAsPrivateSelector)
-
getDnsUri
public String getDnsUri()
-
setDnsUri
public void setDnsUri(String dnsUri)
-
getCacheTimeout
public long getCacheTimeout()
-
setCacheTimeout
public void setCacheTimeout(long cacheTimeout)
-
addPrivate
protected void addPrivate(String alias, PrivateKey key)
-
getPrivateCache
protected PrivateKey getPrivateCache(String alias)
-
getAlias
public String getAlias(DKIMSignature header)
-
findPrivateKey
public PrivateKey findPrivateKey(DKIMSignature header)
- Specified by:
findPrivateKey
in interfaceKeyRepository
-
findPublicKey
public PublicKey findPublicKey(DKIMSignature header)
- Specified by:
findPublicKey
in interfaceKeyRepository
-
-