Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auth Service

A sample authentication service used as the companion service in the Kargo book.

This service issues, validates, and revokes bearer tokens. It stores tokens in memory and is designed for demonstrating multi-service Kargo promotion workflows.

Endpoints

Method Path Description
GET /healthz Liveness probe
GET /readyz Readiness probe
GET /version Build version and commit SHA
POST /api/v1/auth/token Create a token (accepts username and password)
POST /api/v1/auth/validate Validate a token (Authorization: Bearer <token>)
POST /api/v1/auth/revoke Revoke a token (Authorization: Bearer <token>)

Quick Start

# Run locally
make run

# Run tests
make test

# Build Docker image
make docker-build VERSION=1.0.0

Environment Variables

Variable Default Description
PORT 8081 HTTP listen port

Container Image

Published to ghcr.io/kargobook/auth-service on every push to main and on semver tags.

docker run -p 8081:8081 ghcr.io/kargobook/auth-service:latest

Related Repos

Book Chapters

This service is primarily used in:

  • Chapter 11 — Multi-Service Promotion (coordinated promotion with payments-api)
  • Chapter 12 — Multi-Team and Platform Patterns

License

MIT

About

auth-service example app

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages