diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/java/org/openslx/imagemaster/thrift/server/ImageServerHandler.java | 26 | ||||
| -rw-r--r-- | src/main/thrift/imagemaster.thrift | 24 |
2 files changed, 49 insertions, 1 deletions
diff --git a/src/main/java/org/openslx/imagemaster/thrift/server/ImageServerHandler.java b/src/main/java/org/openslx/imagemaster/thrift/server/ImageServerHandler.java index c1d3aa8..dc1b8f1 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/server/ImageServerHandler.java +++ b/src/main/java/org/openslx/imagemaster/thrift/server/ImageServerHandler.java @@ -4,8 +4,12 @@ import org.apache.log4j.Logger; import org.apache.thrift.TException; import org.openslx.imagemaster.server.ApiServer; import org.openslx.imagemaster.thrift.iface.AuthenticationException; +import org.openslx.imagemaster.thrift.iface.AuthorizationException; +import org.openslx.imagemaster.thrift.iface.FtpCredentials; +import org.openslx.imagemaster.thrift.iface.ImageData; import org.openslx.imagemaster.thrift.iface.ImageServer; import org.openslx.imagemaster.thrift.iface.InvalidTokenException; +import org.openslx.imagemaster.thrift.iface.ServerSessionData; import org.openslx.imagemaster.thrift.iface.SessionData; import org.openslx.imagemaster.thrift.iface.UserInfo; @@ -35,4 +39,26 @@ public class ImageServerHandler implements ImageServer.Iface return ApiServer.getUserFromToken( token ); } + @Override + public String startServerAuthentication(String organization) + throws TException { + // TODO Auto-generated method stub + return null; + } + + @Override + public ServerSessionData serverAuthenticate(String organization, + String challengeResponse) throws AuthenticationException, + TException { + // TODO Auto-generated method stub + return null; + } + + @Override + public FtpCredentials submitImage(ImageData imageDescription) + throws AuthorizationException, TException { + // TODO Auto-generated method stub + return null; + } + } diff --git a/src/main/thrift/imagemaster.thrift b/src/main/thrift/imagemaster.thrift index 7c59079..7f50dfc 100644 --- a/src/main/thrift/imagemaster.thrift +++ b/src/main/thrift/imagemaster.thrift @@ -7,6 +7,7 @@ namespace php testing typedef string ID typedef string Token +typedef string UUID enum AuthorizationError { GENERIC_ERROR, @@ -47,13 +48,34 @@ struct SessionData { 3: string serverAddress } +struct FtpCredentials { + 1: string username, + 2: string password +} + +struct ServerSessionData { + 1: ID sessionId +} + +struct ImageData { + 1: UUID uuid, + 2: string imageName + /* other rows */ +} + service ImageServer { bool ping(), SessionData authenticate(1:string username, 2:string password) throws (1:AuthenticationException failure), - UserInfo getUserFromToken(1:Token token) throws (1:InvalidTokenException failure) + UserInfo getUserFromToken(1:Token token) throws (1:InvalidTokenException failure), + + string startServerAuthentication(1:string organization), + + ServerSessionData serverAuthenticate(1:string organization, 2:string challengeResponse) throws (1:AuthenticationException failure), + + FtpCredentials submitImage(1:ImageData imageDescription) throws (1:AuthorizationException failure) } |
