From fc513ffe5eab1447b8d4ca1e4a096454b7ff0e28 Mon Sep 17 00:00:00 2001 From: Paul Latzelsperger Date: Sat, 13 Jan 2024 13:42:57 +0100 Subject: [PATCH] added javadoc --- .../edc/identityhub/core/LocalPublicKeySupplier.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/LocalPublicKeySupplier.java b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/LocalPublicKeySupplier.java index a535bdb70..fadd49dea 100644 --- a/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/LocalPublicKeySupplier.java +++ b/core/identity-hub-credentials/src/main/java/org/eclipse/edc/identityhub/core/LocalPublicKeySupplier.java @@ -31,6 +31,12 @@ import static org.eclipse.edc.identityhub.core.CoreServicesExtension.PUBLIC_KEY_VAULT_ALIAS_PROPERTY; +/** + * Provides a public key, that is resolved from the vault, a file (using the path) or a raw string, in that sequence. + * Typically, we use this when we have a public key configured for the STS service, so we can verify access tokens created by it. + *

+ * It is NOT intended for general use when resolving arbitrary public keys! + */ public class LocalPublicKeySupplier implements Supplier { public static final String NO_PUBLIC_KEY_CONFIGURED_ERROR = "No public key was configured! Please either configure '%s', '%s' or '%s'." .formatted(PUBLIC_KEY_VAULT_ALIAS_PROPERTY, PUBLIC_KEY_PATH_PROPERTY, PUBLIC_KEY_VAULT_ALIAS_PROPERTY); @@ -65,7 +71,7 @@ public PublicKey get() { * Retrieves a public key from a PEM file specified by the given path. * * @param path The path to the PEM file containing the public key. - * @return A {@link PublicKeyWrapper} object representing the public key. + * @return A {@link PublicKey} object representing the public key. * @throws EdcException If an error occurs while reading the file or parsing the public key. */ private Result getPublicKeyFromFile(String path) {