Skip to content

softwarity/spring-jwt

Repository files navigation

Spring-JWT

Sample and simple implementation to extract and use jwt token from header in microservices architecture behind ARCHWAY Application gateway

Build

mvn clean package

Use springboot

Configure env variables in env.properties

PORT=9292
JWT_PUBLIC_KEY_FILE=../jwt_public_key.pem
JWT_ALGORITHM=RSA256

launch shell

mvn springboot:run

Use docker

build image

docker build -t ghcr.io/softwarity/spring-jwt:latest --build-arg GIT_TAG_REV=$(git rev-parse HEAD) .

launch docker

docker run -p 9292:8080 -v /absolutepath/jwt_public_key.pem:/jwt_public_key.pem -e JWT_PUBLIC_KEY_FILE=/jwt_public_key.pem -e JWT_ALGORITHM=RSA256 ghcr.io/softwarity/spring-jwt:latest

launch swarm

# create secret
docker secret create jwt_public_key ../jwt_public_key.pem
# deploy
docker stack deploy -c docker-compose.yml $STACKNAME

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages