OAuth2 and JWT : public key from modulus ("n") and exponent ("e")

hello,

OAuth2 and JWT use JSON to exchange public/private keys.

I get the modulus ("n" and exponent ("e")  representing a public key from a JSON Web Key file
i need to build publickey in pem format.

("-----BEGIN PUBLIC KEY----- (Base64EncodedKey)-----END PUBLIC KEY-----" 

Does anyone have already build this routine?.

Thanks

L