{"swagger":"2.0","info":{"description":"This the REST workshop API","version":"1.0.0","title":"557 Projetct Login API","contact":{"email":"andrih@seas.upenn.edu"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"tags":[{"name":"admins","description":"Secured Admin-only calls"},{"name":"developers","description":"Operations available to regular developers"}],"paths":{"/registration":{"post":{"tags":["developers"],"summary":"registering a new user","operationId":"addUser","description":"By passing in the username and password, you can add a new user\nin the system\n","produces":["application/json"],"parameters":[{"in":"body","name":"newUser","description":"the username and password of the new user","schema":{"type":"object","required":["userName","password"],"properties":{"userName":{"type":"string"},"password":{"type":"string"}},"$ref":"#/definitions/Users"}}],"responses":{"201":{"description":"user was created successfully","schema":{"$ref":"#/definitions/Users"}},"400":{"description":"user already exists"}}}},"/login":{"get":{"tags":["developers"],"summary":"login a user given the username and password","operationId":"authenticateUser","description":"The view will perform password validation and the backend will perfom password authentication","produces":["application/json"],"parameters":[{"in":"query","type":"string","name":"username","description":"the username of the user"},{"in":"query","type":"string","name":"password","description":"the password of the user"}],"responses":{"200":{"description":"login successful the backend will return the session id"},"401":{"description":"invalid username or password"}}}},"/getUser":{"get":{"tags":["developers"],"summary":"finds a user object given username","operationId":"findUser","description":"The backend will find the user based the name","produces":["application/json"],"parameters":[{"in":"query","type":"string","name":"username","description":"the username of the user"}],"responses":{"200":{"description":"login successful the backend will return the user object"},"401":{"description":"user doesn't exist"}}}}},"definitions":{"Users":{"type":"object","required":["username","password"],"properties":{"id":{"type":"string","format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"username":{"type":"string","example":"big_bird"},"password":{"type":"string","example":"testpassword"},"friendList":{"type":"object","example":["ehfiuaj3-6c54-4b01-90e6-d701748f0851","asfmop3-3k03-4b01-90e6-asjpoawjpop131"]}}}},"host":"virtserver.swaggerhub.com","schemes":["https"],"basePath":"/andrih/557-Project-Login/1.0.0"}