Skip to content

Commit 380fee9

Browse files
random client credentials in test
1 parent 7380dc7 commit 380fee9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/compliance/password-grant-type_test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,10 @@ describe('PasswordGrantType Compliance', function () {
190190
const request = createDefaultRequest();
191191
const response = new Response({});
192192

193-
request.headers.authorization = 'Basic ' + Buffer.from('wrong:wrong').toString('base64');
193+
const clientId = Math.round(Math.random() * 1000000).toString(16);
194+
const clientSecret = Math.round(Math.random() * 1000000).toString(16);
195+
196+
request.headers.authorization = 'Basic ' + Buffer.from(`${clientId}:${clientSecret}`).toString('base64');
194197

195198
await auth.token(request, response, {})
196199
.catch(err => {

0 commit comments

Comments
 (0)