OAuthServerMock

OAuth Server Mock.

This class mocks an oauth2 server, by generating valid signed JWTs. The class also provides the endpoint from where the public keys can be downloaded.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun generateJWT(claims: Map<String, Any>): String

Generate a signed JWT with the supplied claims. The only claims automatically included are: nbf and exp

Link copied to clipboard

Returns the URI for JWKS.

Link copied to clipboard
fun shutdown()

Stops the mocked oauth server.

Link copied to clipboard
fun start()

Starts the mocked oauth server.