Skip to content
Snippets Groups Projects
Commit afb6939d authored by Martin Vogel's avatar Martin Vogel
Browse files

#414 Refactor internal interfaces

parent 936d141d
No related branches found
No related tags found
2 merge requests!2#414 Remaining changes from MR,!1planning#414 Methoden Signaturen (Zwischenstand)
package de.fitko.fitconnect.api.services.auth;
import de.fitko.fitconnect.api.domain.auth.OAuthToken;
import de.fitko.fitconnect.api.domain.model.submission.SubmissionRequest;
import de.fitko.fitconnect.api.exceptions.internal.AuthenticationException;
import de.fitko.fitconnect.api.domain.model.submission.SubmissionSubmit;
import de.fitko.fitconnect.api.exceptions.AuthenticationException;
/**
* A Service that provides an interface to authenticate against the Fit-Connect API in order
* to send a {@link SubmissionRequest}.
* to send a {@link SubmissionSubmit}.
*
* @see <a href="https://docs.fitko.de/fit-connect/docs/getting-started/authentication">Fit-Connect documentation on authentication</a>
*
*/
public interface OAuthService {
......
......@@ -3,12 +3,12 @@ package de.fitko.fitconnect.api.services.crypto;
import com.nimbusds.jose.jwk.RSAKey;
import de.fitko.fitconnect.api.domain.model.metadata.data.Data;
import de.fitko.fitconnect.api.domain.model.metadata.attachment.Attachment;
import de.fitko.fitconnect.api.domain.model.submission.SubmissionRequest;
import de.fitko.fitconnect.api.exceptions.internal.DecryptionException;
import de.fitko.fitconnect.api.exceptions.internal.EncryptionException;
import de.fitko.fitconnect.api.domain.model.submission.SubmissionSubmit;
import de.fitko.fitconnect.api.exceptions.DecryptionException;
import de.fitko.fitconnect.api.exceptions.EncryptionException;
/**
* A service that allows to encrypt and decrypt {@link Data} and {@link Attachment}s of a {@link SubmissionRequest} via JWE.
* A service that allows to encrypt and decrypt {@link Data} and {@link Attachment}s of a {@link SubmissionSubmit} via JWE.
*
* @see <a href="https://datatracker.ietf.org/doc/html/rfc7516">JSON-Web-Encryption</a>
*/
......@@ -17,7 +17,7 @@ public interface CryptoService {
/**
* Decrypts a JWE encrypted string with the given private key
*
* @param privateKey RSA private key the encrypted JWE string is decrypted with
* @param privateKey RSA private key the encrypted JWE string is decrypted with
* @param encryptedData serialized encrypted JWE string that is decrypted
* @return a string serialization of the decrypted payload
* @throws DecryptionException if the payload cannot be decrypted or there was an issue with the key
......@@ -27,7 +27,7 @@ public interface CryptoService {
/**
* Decrypts a JWE encrypted byte[] with the given private key
*
* @param privateKey RSA private key the encrypted JWE string is decrypted with
* @param privateKey RSA private key the encrypted JWE string is decrypted with
* @param encryptedData serialized encrypted JWE string that is decrypted
* @return a byte[] of the decrypted string payload
* @throws DecryptionException if the payload cannot be decrypted or there was an issue with the key
......@@ -38,7 +38,7 @@ public interface CryptoService {
* JWE encrypts a given string payload with the public key
*
* @param publicKey RSA public key the payload is encrypted with
* @param data json or xml data that should be encrypted
* @param data json or xml data that should be encrypted
* @return a string serialization of the encrypted JWE object
* @throws EncryptionException if the payload cannot be encrypted or there was an issue with the key
*/
......@@ -48,7 +48,7 @@ public interface CryptoService {
* JWE encrypts a given byte[] payload with the public key
*
* @param publicKey RSA public key the payload is encrypted with
* @param bytes byte[] of the data that should be encrypted
* @param bytes byte[] of the data that should be encrypted
* @return a string serialization of the encrypted JWE object
* @throws EncryptionException if the payload cannot be encrypted or there was an issue with the key
*/
......
......@@ -3,12 +3,12 @@ package de.fitko.fitconnect.api.services.metadata;
import de.fitko.fitconnect.api.domain.model.metadata.Metadata;
import de.fitko.fitconnect.api.domain.model.metadata.attachment.Attachment;
import de.fitko.fitconnect.api.domain.model.metadata.data.Data;
import de.fitko.fitconnect.api.domain.model.submission.SubmissionRequest;
import de.fitko.fitconnect.api.domain.model.submission.SubmissionSubmit;
import java.util.List;
/**
* Provides the generation of correct and valid {@link Metadata} for a {@link SubmissionRequest}
* Provides the generation of correct and valid {@link Metadata} for a {@link SubmissionSubmit}
*
* @see
* <a href="https://docs.fitko.de/fit-connect/docs/metadataoverview">Metadata</a> and
......
......@@ -3,11 +3,11 @@ package de.fitko.fitconnect.api.services.validation;
import de.fitko.fitconnect.api.domain.model.metadata.Metadata;
import de.fitko.fitconnect.api.domain.model.metadata.attachment.Attachment;
import de.fitko.fitconnect.api.domain.model.metadata.data.Data;
import de.fitko.fitconnect.api.domain.model.submission.SubmissionRequest;
import de.fitko.fitconnect.api.domain.model.submission.SubmissionSubmit;
import de.fitko.fitconnect.api.domain.validation.ValidationResult;
/**
* A validator that ensure the integrity of the transferred {@link Metadata} of a {@link SubmissionRequest}.
* A validator that ensure the integrity of the transferred {@link Metadata} of a {@link SubmissionSubmit}.
* Both schema-validation and hash value validation is provided.
*
* @see <a href="https://docs.fitko.de/fit-connect/docs/sending/metadata#integrity">Metadata Integrity</a>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment