@@ -28,15 +28,15 @@ class Google_AssertionCredentials {
28
28
public $ privateKey ;
29
29
public $ privateKeyPassword ;
30
30
public $ assertionType ;
31
- public $ prn ;
31
+ public $ sub ;
32
32
33
33
/**
34
34
* @param $serviceAccountName
35
35
* @param $scopes array List of scopes
36
36
* @param $privateKey
37
37
* @param string $privateKeyPassword
38
38
* @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
40
40
* application is requesting delegated access.
41
41
*/
42
42
public function __construct (
@@ -45,13 +45,13 @@ public function __construct(
45
45
$ privateKey ,
46
46
$ privateKeyPassword = 'notasecret ' ,
47
47
$ assertionType = 'http://oauth.net/grant_type/jwt/1.0/bearer ' ,
48
- $ prn = false ) {
48
+ $ sub = false ) {
49
49
$ this ->serviceAccountName = $ serviceAccountName ;
50
50
$ this ->scopes = is_string ($ scopes ) ? $ scopes : implode (' ' , $ scopes );
51
51
$ this ->privateKey = $ privateKey ;
52
52
$ this ->privateKeyPassword = $ privateKeyPassword ;
53
53
$ this ->assertionType = $ assertionType ;
54
- $ this ->prn = $ prn ;
54
+ $ this ->sub = $ sub ;
55
55
}
56
56
57
57
public function generateAssertion () {
@@ -65,8 +65,8 @@ public function generateAssertion() {
65
65
'iss ' => $ this ->serviceAccountName ,
66
66
);
67
67
68
- if ($ this ->prn !== false ) {
69
- $ jwtParams ['prn ' ] = $ this ->prn ;
68
+ if ($ this ->sub !== false ) {
69
+ $ jwtParams ['sub ' ] = $ this ->sub ;
70
70
}
71
71
72
72
return $ this ->makeSignedJwt ($ jwtParams );
0 commit comments