Skip to content

Commit 9744901

Browse files
author
silvano
committed
Changed prn assertion parameter to sub.
1 parent 43fbbaf commit 9744901

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/auth/Google_AssertionCredentials.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ class Google_AssertionCredentials {
2828
public $privateKey;
2929
public $privateKeyPassword;
3030
public $assertionType;
31-
public $prn;
31+
public $sub;
3232

3333
/**
3434
* @param $serviceAccountName
3535
* @param $scopes array List of scopes
3636
* @param $privateKey
3737
* @param string $privateKeyPassword
3838
* @param string $assertionType
39-
* @param bool|string $prn The email address of the user for which the
39+
* @param bool|string $sub The email address of the user for which the
4040
* application is requesting delegated access.
4141
*/
4242
public function __construct(
@@ -45,13 +45,13 @@ public function __construct(
4545
$privateKey,
4646
$privateKeyPassword = 'notasecret',
4747
$assertionType = 'http://oauth.net/grant_type/jwt/1.0/bearer',
48-
$prn = false) {
48+
$sub = false) {
4949
$this->serviceAccountName = $serviceAccountName;
5050
$this->scopes = is_string($scopes) ? $scopes : implode(' ', $scopes);
5151
$this->privateKey = $privateKey;
5252
$this->privateKeyPassword = $privateKeyPassword;
5353
$this->assertionType = $assertionType;
54-
$this->prn = $prn;
54+
$this->sub = $sub;
5555
}
5656

5757
public function generateAssertion() {
@@ -65,8 +65,8 @@ public function generateAssertion() {
6565
'iss' => $this->serviceAccountName,
6666
);
6767

68-
if ($this->prn !== false) {
69-
$jwtParams['prn'] = $this->prn;
68+
if ($this->sub !== false) {
69+
$jwtParams['sub'] = $this->sub;
7070
}
7171

7272
return $this->makeSignedJwt($jwtParams);

0 commit comments

Comments
 (0)