@@ -373,13 +373,13 @@ describe('AuthorizationCodeGrantType integration', function() {
373373 codeChallengeMethod : 'S256' ,
374374 codeChallenge : stringUtil . base64URLEncode ( crypto . createHash ( 'sha256' ) . update ( codeVerifier ) . digest ( ) )
375375 } ;
376- var client = { id : 'foobar' } ;
376+ var client = { id : 'foobar' , isPublic : true } ;
377377 var model = {
378378 getAuthorizationCode : function ( ) { return authorizationCode ; } ,
379379 revokeAuthorizationCode : function ( ) { } ,
380380 saveToken : function ( ) { }
381381 } ;
382- var grantType = new AuthorizationCodeGrantType ( { accessTokenLifetime : 123 , model : model } ) ;
382+ var grantType = new AuthorizationCodeGrantType ( { accessTokenLifetime : 123 , model : model , PKCEEnabled : true } ) ;
383383 var request = new Request ( { body : { code : 12345 , code_verifier : 'foo' } , headers : { } , method : { } , query : { } } ) ;
384384
385385 return grantType . getAuthorizationCode ( request , client )
@@ -399,13 +399,13 @@ describe('AuthorizationCodeGrantType integration', function() {
399399 codeChallengeMethod : 'plain' ,
400400 codeChallenge : 'baz'
401401 } ;
402- var client = { id : 'foobar' } ;
402+ var client = { id : 'foobar' , isPublic : true } ;
403403 var model = {
404404 getAuthorizationCode : function ( ) { return authorizationCode ; } ,
405405 revokeAuthorizationCode : function ( ) { } ,
406406 saveToken : function ( ) { }
407407 } ;
408- var grantType = new AuthorizationCodeGrantType ( { accessTokenLifetime : 123 , model : model } ) ;
408+ var grantType = new AuthorizationCodeGrantType ( { accessTokenLifetime : 123 , model : model , PKCEEnabled : true } ) ;
409409 var request = new Request ( { body : { code : 12345 , code_verifier : 'foo' } , headers : { } , method : { } , query : { } } ) ;
410410
411411 return grantType . getAuthorizationCode ( request , client )
@@ -420,19 +420,19 @@ describe('AuthorizationCodeGrantType integration', function() {
420420 var codeVerifier = stringUtil . base64URLEncode ( crypto . randomBytes ( 32 ) ) ;
421421 var authorizationCode = {
422422 authorizationCode : 12345 ,
423- client : { id : 'foobar' } ,
423+ client : { id : 'foobar' , isPublic : true } ,
424424 expiresAt : new Date ( new Date ( ) * 2 ) ,
425425 user : { } ,
426426 codeChallengeMethod : 'S256' ,
427427 codeChallenge : stringUtil . base64URLEncode ( crypto . createHash ( 'sha256' ) . update ( codeVerifier ) . digest ( ) )
428428 } ;
429- var client = { id : 'foobar' } ;
429+ var client = { id : 'foobar' , isPublic : true } ;
430430 var model = {
431431 getAuthorizationCode : function ( ) { return authorizationCode ; } ,
432432 revokeAuthorizationCode : function ( ) { } ,
433433 saveToken : function ( ) { }
434434 } ;
435- var grantType = new AuthorizationCodeGrantType ( { accessTokenLifetime : 123 , model : model } ) ;
435+ var grantType = new AuthorizationCodeGrantType ( { accessTokenLifetime : 123 , model : model , PKCEEnabled : true } ) ;
436436 var request = new Request ( { body : { code : 12345 , code_verifier : codeVerifier } , headers : { } , method : { } , query : { } } ) ;
437437
438438 return grantType . getAuthorizationCode ( request , client )
@@ -451,13 +451,13 @@ describe('AuthorizationCodeGrantType integration', function() {
451451 codeChallengeMethod : 'plain' ,
452452 codeChallenge : 'baz'
453453 } ;
454- var client = { id : 'foobar' } ;
454+ var client = { id : 'foobar' , isPublic : true } ;
455455 var model = {
456456 getAuthorizationCode : function ( ) { return authorizationCode ; } ,
457457 revokeAuthorizationCode : function ( ) { } ,
458458 saveToken : function ( ) { }
459459 } ;
460- var grantType = new AuthorizationCodeGrantType ( { accessTokenLifetime : 123 , model : model } ) ;
460+ var grantType = new AuthorizationCodeGrantType ( { accessTokenLifetime : 123 , model : model , PKCEEnabled : true } ) ;
461461 var request = new Request ( { body : { code : 12345 , code_verifier : 'baz' } , headers : { } , method : { } , query : { } } ) ;
462462
463463 return grantType . getAuthorizationCode ( request , client )
0 commit comments