{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/php-jwt/issues/95","repository_url":"https://api.github.com/repos/firebase/php-jwt","labels_url":"https://api.github.com/repos/firebase/php-jwt/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/firebase/php-jwt/issues/95/comments","events_url":"https://api.github.com/repos/firebase/php-jwt/issues/95/events","html_url":"https://github.com/firebase/php-jwt/issues/95","id":158277725,"number":95,"title":"Missing/Invalid claim \"kid\" in auth header","user":{"login":"jrm1987","id":4286033,"avatar_url":"https://avatars.githubusercontent.com/u/4286033?v=3","gravatar_id":"","url":"https://api.github.com/users/jrm1987","html_url":"https://github.com/jrm1987","followers_url":"https://api.github.com/users/jrm1987/followers","following_url":"https://api.github.com/users/jrm1987/following{/other_user}","gists_url":"https://api.github.com/users/jrm1987/gists{/gist_id}","starred_url":"https://api.github.com/users/jrm1987/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrm1987/subscriptions","organizations_url":"https://api.github.com/users/jrm1987/orgs","repos_url":"https://api.github.com/users/jrm1987/repos","events_url":"https://api.github.com/users/jrm1987/events{/privacy}","received_events_url":"https://api.github.com/users/jrm1987/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-06-03T02:14:00Z","updated_at":"2016-07-23T18:03:44Z","closed_at":null,"body":"Getting error \"Missing claim \"kid\" in auth header\". When I add the key ID to get rid of this error, I get \"Invalid claim 'kid' in auth header.\" - I request you to please let me know if you know something about this. Development has stopped for 2 days because of this issue. Thanks a tonne.\r\n\r\n    // Prepare payload options\r\n    $payload = array_merge(array (\r\n        'iss' => $service_email,\r\n        'sub' => $service_email,\r\n        'aud' => 'https://identitytoolkit.googleapis.com/google.identity.identitytoolkit.v1.IdentityToolkit',\r\n        'iat' => $now,\r\n        'exp' => $now + ($ttl * 60),\r\n        'claims' => array (),\r\n    ), $options);\r\n    \r\n    // Prepare payload claims\r\n    $payload['uid'] = firebase_uid2fbid($uid, TRUE);\r\n    $payload['claims'] = array(\r\n        'provider' => 'drupal',\r\n    );\r\n    \r\n    // Generate token\r\n    \\Firebase\\JWT\\JWT::$leeway = 60;\r\n    $token = \\Firebase\\JWT\\JWT::encode($payload, $service_key, 'RS256', $service_kid);\r\n\r\nHere, the $server_kid = config.private_key_id and $server_email = config.client_email. If this is not an issue, please tell me what is it I am doing wrong."},"comment":{"url":"https://api.github.com/repos/firebase/php-jwt/issues/comments/234731769","html_url":"https://github.com/firebase/php-jwt/issues/95#issuecomment-234731769","issue_url":"https://api.github.com/repos/firebase/php-jwt/issues/95","id":234731769,"user":{"login":"jrm1987","id":4286033,"avatar_url":"https://avatars.githubusercontent.com/u/4286033?v=3","gravatar_id":"","url":"https://api.github.com/users/jrm1987","html_url":"https://github.com/jrm1987","followers_url":"https://api.github.com/users/jrm1987/followers","following_url":"https://api.github.com/users/jrm1987/following{/other_user}","gists_url":"https://api.github.com/users/jrm1987/gists{/gist_id}","starred_url":"https://api.github.com/users/jrm1987/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrm1987/subscriptions","organizations_url":"https://api.github.com/users/jrm1987/orgs","repos_url":"https://api.github.com/users/jrm1987/repos","events_url":"https://api.github.com/users/jrm1987/events{/privacy}","received_events_url":"https://api.github.com/users/jrm1987/received_events","type":"User","site_admin":false},"created_at":"2016-07-23T18:03:44Z","updated_at":"2016-07-23T18:03:44Z","body":"Actually, I copied and pasted the exact answer which Google sent me.\n\nEl 23 jul. 2016 11:46 a. m., \"Evgeniy OZ\" <notifications@github.com>\nescribió:\n\n> @jrm1987 <https://github.com/jrm1987>\n>\n> This is explained here:\n>\n> that link contains only this text, related to server-to-server:\n>\n> Also, making the request to the firebase REST API is still an exercise for\n> the reader.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/firebase/php-jwt/issues/95#issuecomment-234727963>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AEFmUc8DCsUtadUCrijs4ZXyY0NPDtkaks5qYkVNgaJpZM4ItJRi>\n> .\n>\n"}}
{"actor":{"display_login":"jrm1987"}}