Package com.yoti.api.client
Interface KeyPairSource
- All Known Implementing Classes:
ClassPathKeySource,FileKeyPairSource,InputStreamKeyPairSource,UrlKeyPairSource
public interface KeyPairSource
Responsible for getting key pairs from a source. It parses the stream using
the KeyPairSource.StreamVisitor. Have a look at the implementation to see what
sources are supported or feel free to implement your own.
Implementations should only handle the underlying stream, leaving actual parsing to the supplied StreamVisitor instance.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiongetFromStream(KeyPairSource.StreamVisitor streamVisitor) Parse stream held using the StreamVisitor and return the KeyPair instance.
-
Method Details
-
getFromStream
KeyPair getFromStream(KeyPairSource.StreamVisitor streamVisitor) throws IOException, InitialisationException Parse stream held using the StreamVisitor and return the KeyPair instance.- Parameters:
streamVisitor- visitor handling the actual parsing from the stream- Returns:
- key pair
- Throws:
IOException- signals issues during stream operationsInitialisationException- if the key pair could not be loaded
-