JWT header
{
"alg": "ES256",
"kid": "2X9R4HXF34",
"typ": "JWT"
}
JWT payload
{
"iss": "57246542-96fe-1a63-e053-0824d011072a",
"iat": 1528407600,
"exp": 1528408800,
"aud": "appstoreconnect-v1",
"scope": [
"GET /v1/apps?filter[platform]=IOS"
]
}
JWT
{
"alg": "ES256",
"kid": "private key",
"typ": "JWT"
}
I would like to find out how to calculate the "iat" and "exp" for the current time by using swift mathematical calculations if possible.
I want to find out how to sign the JWT with my private key after I download it, to find out how to create a JWT that would receive a HTTP Status Code 200 OK response from the Terminal.App . I received a 401 error not authorized response and to provide a proper JWT token that has not expired after my first attempt on this a application programming interface, I want to find where to place my private key if not in the "kid" ?
Kind Regards