Skip to content

Commit b10da81

Browse files
authored
correct DSE token (#57)
1 parent 5504fdf commit b10da81

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/common/token-providers/dse-token-providers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class DSEUsernamePasswordTokenProvider extends TokenProvider {
3838
*/
3939
constructor(username: string, password: string) {
4040
super();
41-
this.#token = `cassandra:${this._encodeB64(username)}:${this._encodeB64(password)}`;
41+
this.#token = `Cassandra:${this._encodeB64(username)}:${this._encodeB64(password)}`;
4242
}
4343

4444
/**

tests/unit/common/token-providers.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('unit.common.token-providers', () => {
2929
describe('DSEUsernamePasswordTokenProvider', () => {
3030
it('should provide the properly encoded cassandra token in node', async () => {
3131
const tp = new DSEUsernamePasswordTokenProvider('username', 'password');
32-
assert.strictEqual(await tp.getTokenAsString(), 'cassandra:dXNlcm5hbWU=:cGFzc3dvcmQ=');
32+
assert.strictEqual(await tp.getTokenAsString(), 'Cassandra:dXNlcm5hbWU=:cGFzc3dvcmQ=');
3333
});
3434

3535
it('should provide the properly encoded cassandra token in the browser', async () => {
@@ -38,7 +38,7 @@ describe('unit.common.token-providers', () => {
3838
anyGlobalThis.window = { btoa: anyGlobalThis.btoa };
3939
anyGlobalThis.Buffer = null!;
4040
const tp = new DSEUsernamePasswordTokenProvider('username', 'password');
41-
assert.strictEqual(await tp.getTokenAsString(), 'cassandra:dXNlcm5hbWU=:cGFzc3dvcmQ=');
41+
assert.strictEqual(await tp.getTokenAsString(), 'Cassandra:dXNlcm5hbWU=:cGFzc3dvcmQ=');
4242

4343
[anyGlobalThis.window, anyGlobalThis.Buffer] = [window, buffer];
4444
});

0 commit comments

Comments
 (0)