1.2.4 - Password encoding at login.

master
Tudor Stanciu 2023-04-04 08:56:49 +03:00
parent aff44205cb
commit a1e4b8565b
4 changed files with 6 additions and 5 deletions

View File

@ -43,3 +43,4 @@ All tests in the package can be executed by running: `npm test`.
1.2.1 - Added decodeToken function. The token is obtained directly by the function from local storage. If the token is missing, the function returns null. 1.2.1 - Added decodeToken function. The token is obtained directly by the function from local storage. If the token is missing, the function returns null.
1.2.2 - Upgraded @flare/js-utils package. 1.2.2 - Upgraded @flare/js-utils package.
1.2.3 - Added user group and role types after enriching the "user-info" result. 1.2.3 - Added user group and role types after enriching the "user-info" result.
1.2.4 - Password encoding at login.

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "@flare/tuitio-client", "name": "@flare/tuitio-client",
"version": "1.2.3", "version": "1.2.4",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@flare/tuitio-client", "name": "@flare/tuitio-client",
"version": "1.2.3", "version": "1.2.4",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@flare/js-utils": "^1.1.0", "@flare/js-utils": "^1.1.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "@flare/tuitio-client", "name": "@flare/tuitio-client",
"version": "1.2.3", "version": "1.2.4",
"description": "Tuitio client is an npm package written in typescript that facilitates the integration of a javascript application with Tuitio.", "description": "Tuitio client is an npm package written in typescript that facilitates the integration of a javascript application with Tuitio.",
"main": "./lib/index.js", "main": "./lib/index.js",
"types": "./lib/index.d.ts", "types": "./lib/index.d.ts",

View File

@ -24,7 +24,7 @@ class TuitioClient {
} }
async login(userName: string, password: string): Promise<TuitioLoginResponse> { async login(userName: string, password: string): Promise<TuitioLoginResponse> {
const url = this.urlTemplates.login.replace("{username}", userName).replace("{password}", password); const url = this.urlTemplates.login.replace("{username}", userName).replace("{password}", encodeURIComponent(password));
const response = await request(url, "post"); const response = await request(url, "post");
if (!response.error) { if (!response.error) {