use of org.platformlayer.ops.helpers.ServiceContext in project platformlayer by platformlayer.
the class ServiceProviderBase method getSshPublicKey.
@Override
public PublicKey getSshPublicKey() throws OpsException {
ServiceContext serviceContext = injector.getInstance(ServiceContext.class);
SshKey sshKey = serviceContext.getSshKey();
if (sshKey == null) {
return null;
}
PublicKey publicKey = sshKey.getKeyPair().getPublic();
return publicKey;
}
Aggregations