@@ -896,7 +896,7 @@ describe('jwt', () => {
896
896
) ;
897
897
} ) ;
898
898
899
- it ( 'signs JWT with audience if: user scope = true, default scope = false, audience = falsy, useJWTAccessWithScope = true' , async ( ) => {
899
+ it ( 'signs JWT with scopes if: user scope = true, default scope = false, audience = falsy, useJWTAccessWithScope = true' , async ( ) => {
900
900
const stubGetRequestHeaders = sandbox . stub ( ) . returns ( { } ) ;
901
901
const stubJWTAccess = sandbox . stub ( jwtaccess , 'JWTAccess' ) . returns ( {
902
902
getRequestHeaders : stubGetRequestHeaders ,
@@ -918,7 +918,7 @@ describe('jwt', () => {
918
918
) ;
919
919
} ) ;
920
920
921
- it ( 'signs JWT with audience if: user scope = false, default scope = true, audience = falsy, useJWTAccessWithScope = true' , async ( ) => {
921
+ it ( 'signs JWT with scopes if: user scope = false, default scope = true, audience = falsy, useJWTAccessWithScope = true' , async ( ) => {
922
922
const stubGetRequestHeaders = sandbox . stub ( ) . returns ( { } ) ;
923
923
const stubJWTAccess = sandbox . stub ( jwtaccess , 'JWTAccess' ) . returns ( {
924
924
getRequestHeaders : stubGetRequestHeaders ,
@@ -939,7 +939,7 @@ describe('jwt', () => {
939
939
] ) ;
940
940
} ) ;
941
941
942
- it ( 'signs JWT with audience if: user scope = true, default scope = true, audience = falsy, useJWTAccessWithScope = true' , async ( ) => {
942
+ it ( 'signs JWT with scopes if: user scope = true, default scope = true, audience = falsy, useJWTAccessWithScope = true' , async ( ) => {
943
943
const stubGetRequestHeaders = sandbox . stub ( ) . returns ( { } ) ;
944
944
const stubJWTAccess = sandbox . stub ( jwtaccess , 'JWTAccess' ) . returns ( {
945
945
getRequestHeaders : stubGetRequestHeaders ,
@@ -962,7 +962,7 @@ describe('jwt', () => {
962
962
) ;
963
963
} ) ;
964
964
965
- it ( 'signs JWT with audience if: user scope = true, default scope = false, audience = truthy, useJWTAccessWithScope = true' , async ( ) => {
965
+ it ( 'signs JWT with scopes if: user scope = true, default scope = false, audience = truthy, useJWTAccessWithScope = true' , async ( ) => {
966
966
const stubGetRequestHeaders = sandbox . stub ( ) . returns ( { } ) ;
967
967
const stubJWTAccess = sandbox . stub ( jwtaccess , 'JWTAccess' ) . returns ( {
968
968
getRequestHeaders : stubGetRequestHeaders ,
@@ -984,7 +984,7 @@ describe('jwt', () => {
984
984
) ;
985
985
} ) ;
986
986
987
- it ( 'signs JWT with audience if: user scope = true, default scope = true, audience = truthy, useJWTAccessWithScope = true' , async ( ) => {
987
+ it ( 'signs JWT with scopes if: user scope = true, default scope = true, audience = truthy, useJWTAccessWithScope = true' , async ( ) => {
988
988
const stubGetRequestHeaders = sandbox . stub ( ) . returns ( { } ) ;
989
989
const stubJWTAccess = sandbox . stub ( jwtaccess , 'JWTAccess' ) . returns ( {
990
990
getRequestHeaders : stubGetRequestHeaders ,
@@ -1007,7 +1007,7 @@ describe('jwt', () => {
1007
1007
) ;
1008
1008
} ) ;
1009
1009
1010
- it ( 'signs JWT with audience if: user scope = true, default scope = true, audience = truthy, universeDomain = not default universe' , async ( ) => {
1010
+ it ( 'signs JWT with scopes if: user scope = true, default scope = true, audience = truthy, universeDomain = not default universe' , async ( ) => {
1011
1011
const stubGetRequestHeaders = sandbox . stub ( ) . returns ( { } ) ;
1012
1012
const stubJWTAccess = sandbox . stub ( jwtaccess , 'JWTAccess' ) . returns ( {
1013
1013
getRequestHeaders : stubGetRequestHeaders ,
@@ -1025,11 +1025,11 @@ describe('jwt', () => {
1025
1025
stubGetRequestHeaders ,
1026
1026
'https//beepboop.googleapis.com' ,
1027
1027
undefined ,
1028
- undefined
1028
+ [ 'scope1' , 'scope2' ]
1029
1029
) ;
1030
1030
} ) ;
1031
1031
1032
- it ( 'signs JWT with audience if: user scope = true, default scope = true, audience = truthy, useJWTAccessWithScope = true, universeDomain = not default universe' , async ( ) => {
1032
+ it ( 'signs JWT with scopes if: user scope = true, default scope = true, audience = truthy, useJWTAccessWithScope = true, universeDomain = not default universe' , async ( ) => {
1033
1033
const stubGetRequestHeaders = sandbox . stub ( ) . returns ( { } ) ;
1034
1034
const stubJWTAccess = sandbox . stub ( jwtaccess , 'JWTAccess' ) . returns ( {
1035
1035
getRequestHeaders : stubGetRequestHeaders ,
0 commit comments