FrancescoBorzi / TC-JSON-API

Mock example of a TrinityCore RESTful API
GNU Affero General Public License v3.0
42 stars 32 forks source link

Login/register route? #25

Closed azanoni closed 7 years ago

azanoni commented 7 years ago

Its possible made routes for login, logout and register?

Helias commented 7 years ago

Login and register is already implemented as you can see here https://github.com/ShinDarth/TC-JSON-API/commit/3efa4e2f43d2a31d945dad3138c3e0a233677baf, but they aren't documented in the wiki.

Anyway we are planning to migrate the TC-JSON-API into this new API written in Symfony https://github.com/azerothcore/apaw

azanoni commented 7 years ago

@Helias :(, you dont support anymore trinitycore?

Helias commented 7 years ago

Of course we will support it, we will support the platforms trinitycore and azerothcore, azerothcore has the database structure similar to trinitycore

azanoni commented 7 years ago

Thanks, only for clarify, TC-JSON-API will be support TrinityCore and "Apaw" will be support Azerothcore rigth? And you can explain how to use login/register method? because I try to access to: http://localhost/TC-JSON-API/public/auth/login or http://localhost/TC-JSON-API/public/auth/register

and this is the message: "Sorry, the page you are looking for could not be found." If this have a forum or another place to ask help please tellme. Thanks for your support

Helias commented 7 years ago

Did you follow this new guide to install the TC-JSON-API? https://github.com/ShinDarth/TC-JSON-API/blob/master/INSTALL.md

Only the development version supports the authentication so you need to install the latest version from sources. Anyway you can't just go to the path TC-JSON-API/public/auth/login you need to do a POST request with username and password as params, you can use the app POSTMAN to test that.

azanoni commented 7 years ago

Yes the API-REST works but not this 2 new methods: I tested using RESTClient in Firefox, try to use the both ways, json request and parameter request like http://localhost/TC-JSON-API/public/auth/login/?username=test&password=test imagen

avengerweb commented 7 years ago

check routes pls, u missed part of url /api/v1/auth/login

azanoni commented 7 years ago

Thanks!, anyone should be update the readme.md, here is the corrects urls: For login: http://localhost/TC-JSON-API/public/api/v1/auth/login/?username=test123&password=testtest123 For register: http://localhost/TC-JSON-API/public/api/v1/auth/register/?username=test123&password=test123&email=huesoamz@gmail.com