No Description

Sasan Torabkheslat 0834703869 last commit 2 years ago
.gitignore b5d2a992f4 SSH config 2 years ago
Gopkg.toml 74b5b70d5e Initial commit 2 years ago
README.md 74b5b70d5e Initial commit 2 years ago
handler.go 0834703869 last commit 2 years ago
main.go 0834703869 last commit 2 years ago
middleware.go 74b5b70d5e Initial commit 2 years ago
token.go 0834703869 last commit 2 years ago

README.md

ZiTel WebService Template by Sassan

A template with the following features for internal projects of Sysbo-Team at ZiTel

  • JWT authentication mechanism
  • FreeIPA

How to run

openssl s_client -connect ipa.sf.faraborddi.dc:443 >/usr/local/share/ca-certificates/ipa.crt;update-ca-certificates

dep ensure

go build .

./CMD IP PORT

Client

Request:

curl --location --request POST 'http://127.0.0.1:8000/login' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'username=s.torabkheslat' \ --data-urlencode 'password=*******'

Response:

{

"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZG1pbiI6dHJ1ZSwiZXhwIjoxNjM3NDIzMjE0LCJuYW1lIjoicy50b3JhYmtoZXNsYXQiLCJzdWIiOjF9.EWS0JQ0muAXSnI0pyOpbsqJlDPnX37Pi7kPzT4EOZdU",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2Mzc1MDg3MTQsInN1YiI6MX0.l-ziJVifwt3vltgJn419Uka4s_oOJBo1KGX90EI63oI"

}