Skip to content

Authentication API

Oralita edited this page Feb 7, 2022 · 1 revision

Register

[POST] : http://localhost:8080/registers

body : application-json

{
	"username" : String,
	"password" : String,
	"firstname" : String,
	"lastname" : String,
	"email" : String
 }

example

{
	"username" : "oat431",
	"password" : "1590",
	"firstname" : "sahachan",
	"lastname" : "tippimwong",
	"email" : "[email protected]"
 }

response: Registration successful

Login

[POST] : http://localhost:8080/auth

body

{
	"username" : String,
	"password": String
}

example

{
	"username" : "Coal123",
	"password": "Ingot321"
}

response

{
	"user": {
		"id": Integer,
		"username": String,
		"authorities": [String]
	},
	"token": String
}
Clone this wiki locally