diff options
Diffstat (limited to 'src/main/java/org/openslx/imagemaster/server')
| -rw-r--r-- | src/main/java/org/openslx/imagemaster/server/ApiServer.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/main/java/org/openslx/imagemaster/server/ApiServer.java b/src/main/java/org/openslx/imagemaster/server/ApiServer.java index 3799079..2c49a0d 100644 --- a/src/main/java/org/openslx/imagemaster/server/ApiServer.java +++ b/src/main/java/org/openslx/imagemaster/server/ApiServer.java @@ -80,6 +80,14 @@ public class ApiServer { session.getLastName(), session.getEMail()); } + /** + * Request ftp credentials to upload a new image to the masterserver. + * @param imageDescription MetdaData of the new image + * @param serverSessionData the session data of the authenticated uni/hs server + * @return the genereated ftp credentials + * @throws AuthorizationException if the uni/hs server has no valid session + * @throws TException + */ public static FtpCredentials submitImage(ImageData imageDescription, ServerSessionData serverSessionData) throws AuthorizationException, TException { @@ -110,6 +118,12 @@ public class ApiServer { return new FtpCredentials(generatedUser, generatedPass); } + /** + * Start the server authentication of a uni/hs server. + * @param organization the organization that the server belongs to + * @return a random string that needs to be encrypted with the private key + * @throws TException + */ public static String startServerAuthentication(String organization) throws TException { if (organization == null || organization == "") { @@ -121,6 +135,14 @@ public class ApiServer { return ServerAuthenticator.startServerAuthentication(organization); } + /** + * Authenticate the uni/hs server with the encrypted string. + * @param organization the organization that the server belongs to + * @param challengeResponse the encrypted string + * @return session data iff the authentication was successfull + * @throws AuthenticationException + * @throws TException + */ public static ServerSessionData serverAuthenticate(String organization, String challengeResponse) throws AuthenticationException, TException { |
