microservice-authentication

module
v0.0.0-...-0cec475 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2021 License: MIT

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

Directories

Path Synopsis
cmd
pkg
log

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL