Categorygithub.com/Ubivius/microservice-authentication
module
0.0.0-20211125190618-0cec47562e61
Repository: https://github.com/ubivius/microservice-authentication.git
Documentation: pkg.go.dev

# README

microservice-authentication

Microservice to Sign in and Sign up users to Keycloak

Authentication endpoints

GET /health/live Returns a Status OK when live.

GET /health/ready Returns a Status OK when ready or an error when dependencies are not available.

POST /signin Signs in a user with their credentials and returns an access token along with the user's information.
Data Params

{
  "username": "string, required",
  "password": "string, required",
}

POST /signup Add a user with their credentials in Keycloak and create a new user with microservice-user.
Data Params

{
  "username":    "string, required",
  "password":    "string, required",
  "firstname":   "string, required",
  "lastname":    "string, required",
  "email":       "string, required",
  "dateofbirth": "string, required",
}

JWT Claims

	AuthContextClassReference  acr
	AuthorizedParty            azp
	Email                      email
	EmailVerified              email_verified
	ExpirationTime             exp
	LastName                   family_name
	FirstName                  given_name
	IssuedAt                   iat
	Issuer                     iss
	JwtID                      jti
	FullName                   name
	Username                   preferred_username
	Scope                      scope
	SessionState               session_state
	SessionID                  sid
	Subject                    sub
	Type                       typ

# Packages

No description provided by the author
No description provided by the author