Package org.intermine.web.security
Class KeyStorePublicKeySource
- java.lang.Object
-
- org.intermine.web.security.KeyStorePublicKeySource
-
- All Implemented Interfaces:
PublicKeySource
public class KeyStorePublicKeySource extends java.lang.Object implements PublicKeySource
A public key store that reads keys from a key store.- Author:
- Alex Kalderimis
-
-
Constructor Summary
Constructors Constructor Description KeyStorePublicKeySource(java.security.KeyStore store)
Build a key source that reads them from a key store.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.security.PublicKey
get(java.lang.String name)
Get a specific key by name.java.util.Collection<java.security.PublicKey>
getAll()
java.util.Collection<java.security.PublicKey>
getSome(java.lang.String... names)
Get multiple keys given a set of names.
-
-
-
Method Detail
-
get
public java.security.PublicKey get(java.lang.String name) throws KeySourceException
Description copied from interface:PublicKeySource
Get a specific key by name.- Specified by:
get
in interfacePublicKeySource
- Parameters:
name
- The name of the key.- Returns:
- The key.
- Throws:
KeySourceException
- If we can't get that key.
-
getAll
public java.util.Collection<java.security.PublicKey> getAll() throws KeySourceException
- Specified by:
getAll
in interfacePublicKeySource
- Returns:
- All the keys in this key source.
- Throws:
KeySourceException
- If we have issues getting any of them.
-
getSome
public java.util.Collection<java.security.PublicKey> getSome(java.lang.String... names) throws KeySourceException
Description copied from interface:PublicKeySource
Get multiple keys given a set of names.- Specified by:
getSome
in interfacePublicKeySource
- Parameters:
names
- The names of the keys we want.- Returns:
- The matching keys.
- Throws:
KeySourceException
- If we can't get any of the keys.
-
-