fake-jwt-auth-server

Template repo to speed up creating new library projects

License

License

GroupId

GroupId

com.github.michaelruocco
ArtifactId

ArtifactId

fake-jwt-auth-server
Last Version

Last Version

0.1.8
Release Date

Release Date

Type

Type

pom.sha512
Description

Description

fake-jwt-auth-server
Template repo to speed up creating new library projects
Project URL

Project URL

https://github.com/michaelruocco/fake-jwt-auth-server
Source Code Management

Source Code Management

https://github.com/michaelruocco/fake-jwt-auth-server

Download fake-jwt-auth-server

Dependencies

compile (2)

Group / Artifact Type Version
com.github.michaelruocco : rest-client Optional jar 0.1.8
com.fasterxml.jackson.datatype : jackson-datatype-jdk8 Optional jar 2.12.2

runtime (11)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.30
com.nimbusds : nimbus-jose-jwt jar 9.7
com.github.tomakehurst : wiremock-jre8 jar 2.27.2
com.github.michaelruocco : file-loader jar 6.0.1
org.junit.jupiter : junit-jupiter-api jar 5.7.1
com.github.michaelruocco : json-adapter jar 1.0.0
net.minidev : json-smart jar 2.3
com.fasterxml.jackson.core : jackson-annotations jar 2.12.2
com.fasterxml.jackson.core : jackson-databind jar 2.12.2
com.beust : jcommander jar 1.81
org.slf4j : slf4j-simple jar 1.7.30

Project Modules

There are no modules declared in this project.

Fake JWT Auth Server

Build codecov Codacy Badge BCH compliance Quality Gate Status Technical Debt Coverage Lines of Code Maven Central License: MIT

Overview

This library creates a web server that you can use to fake a real JWT token auth server.

If you are not familiar with JSON Web Key (JWK) or JSON Web Token (JWT) there is a good overview and description here.

The fake web server provides two endpoints that are described below:

  1. .well-known/jwks.json that returns a JWK set containing a single key definition
  2. /oauth/token that returns a JWT signed with the key returned from the above endpoint

If you are building an application that uses JWTs for accessing secured endpoints, you can configure your application to point at the JWKs endpoint, so that it can use the JWK to decode the JWT bearer token that you provide in your request. Then when you want to call your secured endpoint you can call the JWT endpoint to generate the token to use in your Authorization header.

Useful Commands

// cleans build directories
// prints currentVersion
// formats code
// builds code
// runs tests
// checks for gradle issues
// checks dependency versions
./gradlew clean currentVersion dependencyUpdates lintGradle spotlessApply build

Versions

Version
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0