# Verify signature of JSON Web Token

**URL:** <https://discourse.julialang.org/t/verify-signature-of-json-web-token/19057>\
**Category:** Tooling\
**Created:** [December 28, 2018, 10:35am UTC](https://discourse.julialang.org/t/verify-signature-of-json-web-token/19057 "2018-12-28T10:35:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivborissov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ivborissov/32/2841_2.png) [@ivborissov](https://discourse.julialang.org/u/ivborissov)\
**Post date:** [December 28, 2018, 10:35am UTC](https://discourse.julialang.org/t/verify-signature-of-json-web-token/19057/1 "2018-12-28T10:35:21Z")

</div>

Hi,

I am using AWS Cognito and I need to verify signature of JSON Web Token with JSON Web Key (JWK), which looks like this

```julia
{
		"kid": "5678example=",
		"alg": "RS256",
		"kty": "RSA",
		"e": "AQAB",
		"n": "987654321",
		"use": "sig"
	}

```

> **[Verifying a JSON Web Token - Amazon Cognito](https://docs.aws.amazon.com/en_us/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-verifying-a-jwt.html)**
>
> Verify a user pool JSON Web Token in three steps.

`JSONWebTokens.jl` pkg has signature verification function but it needs `pem` file and not JWK. I didn’t find Julia’s equivalent to JS `jwk-to-pem` pkg. Is there a way to build `pem` from such JWK in Julia (perhaps, with MbedTLS) or are there any other solutions here (except calling NodeJS from Julia)?
