diff options
| author | Simon Rettberg | 2014-03-28 17:51:24 +0100 |
|---|---|---|
| committer | Simon Rettberg | 2014-03-28 17:51:24 +0100 |
| commit | fbbfee0a32ce83f5bfe36d78eddafed7226a041c (patch) | |
| tree | f3d44e8b9e2bca678165cb3dd97ec1aa1380f244 /src/main/thrift | |
| download | masterserver-fbbfee0a32ce83f5bfe36d78eddafed7226a041c.tar.gz masterserver-fbbfee0a32ce83f5bfe36d78eddafed7226a041c.tar.xz masterserver-fbbfee0a32ce83f5bfe36d78eddafed7226a041c.zip | |
Initial Commit
Diffstat (limited to 'src/main/thrift')
| -rw-r--r-- | src/main/thrift/imagemaster.thrift | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/main/thrift/imagemaster.thrift b/src/main/thrift/imagemaster.thrift new file mode 100644 index 0000000..7c59079 --- /dev/null +++ b/src/main/thrift/imagemaster.thrift @@ -0,0 +1,59 @@ +/** + * Define some namespace/package name for our stuff + */ + +namespace java org.openslx.imagemaster.thrift.iface +namespace php testing + +typedef string ID +typedef string Token + +enum AuthorizationError { + GENERIC_ERROR, + NOT_AUTHENTICATED, + NO_PERMISSION +} + +enum AuthenticationError { + GENERIC_ERROR, + INVALID_CREDENTIALS, + ACCOUNT_SUSPENDED, + BANNED_NETWORK +} + +exception AuthorizationException { + 1: AuthorizationError number, + 2: string message +} + +exception AuthenticationException { + 1: AuthenticationError number, + 2: string message +} + +exception InvalidTokenException { +} + +struct UserInfo { + 1: string userId, + 2: string firstName, + 3: string lastName, + 4: string eMail +} + +struct SessionData { + 1: ID sessionId, + 2: Token authToken, + 3: string serverAddress +} + +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) + +} + |
