/microservice-authentication

Microservice for sign in and sign up for our users

Primary LanguageGoMIT LicenseMIT

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