我向后端发送了一个http请求,并且想验证此请求所附的cookie中的id令牌。
我正在尝试验证以下内容(从这里复制了想法-https://auth0.com/docs/libraries/auth0-php/jwt-validation)-
$this->config = [
'supported_algs' => [ 'RS256' ],
'valid_audiences' => [ /* Client Id from AWS Cognito */ ],
'authorized_iss' => [ "https://cognito-idp.{region}.amazonaws.com/{userPoolId}/.well-known/jwks.json" ]
];
$verifier = new JWTVerifier($this->config);
$decoded_token = $verifier->verifyAndDecode($_COOKIE['id_token']);
我要例外了-抓到了:CoreException - We cannot trust on a token issued by https://cognito-idp.{region}.amazonaws.com/{userPoolId} Api key is not valid
我在这里做错了什么?