Compare commits

...

75 Commits

Author SHA1 Message Date
73a2631867 deprecate package
Some checks failed
continuous-integration/drone/push Build is failing
2021-04-12 08:05:18 +02:00
c0811f0f08 fix
Some checks failed
continuous-integration/drone/push Build is failing
2020-11-02 19:13:19 +01:00
fb75ebb1cc update stryker
All checks were successful
continuous-integration/drone/push Build is passing
2020-10-12 18:03:08 +02:00
15b4ddb407 stryker: use per test coverage
Some checks failed
continuous-integration/drone/push Build is failing
2020-10-04 17:58:13 +02:00
d05eaec7c7 fix stryker config
Some checks failed
continuous-integration/drone/push Build is failing
2020-10-04 12:33:12 +02:00
b54068954c use jasmine
All checks were successful
continuous-integration/drone/push Build is passing
2020-09-28 11:10:15 +02:00
3d93b0cd9a update-scanner: automatic update
Some checks failed
continuous-integration/drone/push Build is failing
eslint: 7.7.0 ==> 7.8.1 minor
node-fetch: 2.6.0 ==> 2.6.1 minor
2020-09-07 13:39:15 +02:00
d503b8c6fa update-scanner: automatic update
Some checks failed
continuous-integration/drone/push Build is failing
ava: 3.11.1 ==> 3.12.1 minor
2020-08-30 16:02:05 +02:00
2f24ad6da5 update-scanner: automatic update
Some checks failed
continuous-integration/drone/push Build is failing
eslint: 7.6.0 ==> 7.7.0 minor
2020-08-19 08:30:29 +02:00
b18030e6d2 fix drone config
Some checks failed
continuous-integration/drone/push Build is failing
2020-08-07 08:11:05 +02:00
986aab33a4 update-scanner: automatic update
Some checks failed
continuous-integration/drone/push Build is failing
ava: 3.10.1 ==> 3.11.1 minor
eslint: 7.5.0 ==> 7.6.0 minor
2020-08-04 13:02:18 +02:00
79ac44cb52 fix
All checks were successful
continuous-integration/drone/push Build is passing
2020-07-19 15:26:08 +02:00
7502e10c94 update-scanner: automatic update
Some checks failed
continuous-integration/drone/push Build is failing
@sapphirecode/consts: 1.1.27 ==> 1.1.28 minor
@sapphirecode/crypto-helper: 1.1.55 ==> 1.1.57 minor
@sapphirecode/eslint-config: 2.1.15 ==> 2.1.16 minor
2020-07-19 15:13:15 +02:00
5ec975739d fix
Some checks failed
continuous-integration/drone/push Build is failing
2020-07-19 14:01:17 +02:00
ea3644b835 update-scanner: automatic update
Some checks failed
continuous-integration/drone/push Build is failing
eslint: 7.4.0 ==> 7.5.0 minor
2020-07-19 12:17:21 +02:00
09cbd6d93c update-scanner: automatic update
All checks were successful
continuous-integration/drone/push Build is passing
@sapphirecode/consts: 1.1.25 ==> 1.1.27 minor
@sapphirecode/crypto-helper: 1.1.53 ==> 1.1.55 minor
@sapphirecode/eslint-config: 2.1.13 ==> 2.1.15 minor
@stryker-mutator/core: 3.3.0 ==> 3.3.1 minor
@stryker-mutator/javascript-mutator: 3.3.0 ==> 3.3.1 minor
ava: 3.9.0 ==> 3.10.1 minor
eslint: 7.3.1 ==> 7.4.0 minor
2020-07-10 12:38:43 +02:00
d62d68dd83 switch to drone
All checks were successful
continuous-integration/drone/push Build is passing
2020-07-10 08:24:40 +02:00
aa67a690cc update-scanner: automatic update
@sapphirecode/consts: 1.1.24 ==> 1.1.25 minor
@sapphirecode/crypto-helper: 1.1.52 ==> 1.1.53 minor
@sapphirecode/eslint-config: 2.1.12 ==> 2.1.13 minor
2020-07-01 09:37:30 +02:00
7b671cba0a update-scanner: automatic update
@sapphirecode/consts: 1.1.23 ==> 1.1.24 minor
@sapphirecode/crypto-helper: 1.1.51 ==> 1.1.52 minor
@sapphirecode/eslint-config: 2.1.10 ==> 2.1.12 minor
eslint: 7.3.0 ==> 7.3.1 minor
2020-06-24 12:56:33 +02:00
f6f5243775 update-scanner: automatic update
@sapphirecode/consts: 1.1.22 ==> 1.1.23 minor
@sapphirecode/crypto-helper: 1.1.50 ==> 1.1.51 minor
@sapphirecode/eslint-config: 2.1.9 ==> 2.1.10 minor
eslint: 7.2.0 ==> 7.3.0 minor
2020-06-22 08:27:01 +02:00
8c06a0003e update-scanner: automatic update
@sapphirecode/crypto-helper: 1.1.49 ==> 1.1.50 minor
@stryker-mutator/core: 3.2.4 ==> 3.3.0 minor
@stryker-mutator/javascript-mutator: 3.2.4 ==> 3.3.0 minor
ava: 3.8.2 ==> 3.9.0 minor
2020-06-19 13:14:38 +02:00
81ccb2d119 update-scanner: automatic update
@sapphirecode/consts: 1.1.21 ==> 1.1.22 minor
@sapphirecode/crypto-helper: 1.1.48 ==> 1.1.49 minor
@sapphirecode/eslint-config: 2.1.8 ==> 2.1.9 minor
eslint: 7.1.0 ==> 7.2.0 minor
2020-06-11 20:36:46 +02:00
8c0eadae97 update-scanner: automatic update
@sapphirecode/consts: 1.1.20 ==> 1.1.21 minor
@sapphirecode/crypto-helper: 1.1.47 ==> 1.1.48 minor
@sapphirecode/eslint-config: 2.1.7 ==> 2.1.8 minor
nyc: 15.0.1 ==> 15.1.0 minor
2020-06-02 08:53:48 +02:00
5ad538232e update-scanner: automatic update
@sapphirecode/consts: 1.1.19 ==> 1.1.20 minor
@sapphirecode/crypto-helper: 1.1.46 ==> 1.1.47 minor
@sapphirecode/eslint-config: 2.1.6 ==> 2.1.7 minor
@stryker-mutator/core: 3.2.3 ==> 3.2.4 minor
@stryker-mutator/javascript-mutator: 3.2.3 ==> 3.2.4 minor
eslint: 7.0.0 ==> 7.1.0 minor
2020-05-23 18:28:04 +02:00
1ee5ede443 update-scanner: automatic update
@sapphirecode/consts: 1.1.18 ==> 1.1.19 minor
@sapphirecode/crypto-helper: 1.1.44 ==> 1.1.46 minor
@sapphirecode/eslint-config: 2.1.4 ==> 2.1.6 minor
2020-05-17 19:45:03 +02:00
4690fda999 fix 2020-05-17 18:54:31 +02:00
960814a96b fix 2020-05-17 17:32:26 +02:00
4399d3c951 update 2020-05-17 17:31:15 +02:00
b105efa6ed update jenkins.js 2020-05-15 13:15:53 +02:00
e9d38463f8 adapt jenkins.js 2020-05-13 16:05:11 +02:00
93ef222dd1 update-scanner: automatic update
@sapphirecode/crypto-helper: 1.1.42 ==> 1.1.43 minor
ava: 3.8.1 ==> 3.8.2 minor
eslint: 6.8.0 ==> 7.0.0 major
2020-05-09 21:58:54 +02:00
3856b168b0 update-scanner: automatic update
@sapphirecode/consts: 1.1.15 ==> 1.1.16 minor
@sapphirecode/crypto-helper: 1.1.41 ==> 1.1.42 minor
@sapphirecode/eslint-config: 2.0.24 ==> 2.0.25 minor
2020-05-08 13:48:32 +02:00
9e9b1a57de update-scanner: automatic update
@sapphirecode/consts: 1.1.14 ==> 1.1.15 minor
@sapphirecode/crypto-helper: 1.1.40 ==> 1.1.41 minor
@sapphirecode/eslint-config: 2.0.23 ==> 2.0.24 minor
2020-05-07 10:38:20 +02:00
983dfaff58 update-scanner: automatic update
@sapphirecode/crypto-helper: 1.1.39 ==> 1.1.40 minor
2020-05-06 10:17:54 +02:00
67ffb62c30 fix 2020-05-06 10:08:53 +02:00
45f3337527 update-scanner: automatic update
@sapphirecode/consts: 1.1.13 ==> 1.1.14 minor
2020-05-06 10:05:04 +02:00
7e6886d8ff fix 2020-05-06 08:39:35 +02:00
d994749ea7 fix 2020-05-06 07:50:40 +02:00
df7e098fc7 fix 2020-05-06 07:44:00 +02:00
514d630e4c fix 2020-05-06 07:32:49 +02:00
928d8036a4 fix yarn.lock 2020-05-05 19:51:57 +02:00
ebf5208d82 fix publish 2020-05-05 19:49:42 +02:00
4f1cb8dd17 move to @sapphirecode scope 2020-05-05 19:21:19 +02:00
20ede219b3 update-scanner: automatic update
@scode/consts: 1.1.9 ==> 1.1.11 minor
@scode/crypto-helper: 1.1.36 ==> 1.1.38 minor
@scode/eslint-config: 2.0.15 ==> 2.0.16 minor
2020-05-04 21:15:09 +02:00
40a204309f add compile script 2020-05-04 20:38:18 +02:00
9b2d97b9bb update-scanner: automatic update
@scode/consts: 1.1.7 ==> 1.1.9 minor
@scode/crypto-helper: 1.1.34 ==> 1.1.36 minor
@scode/eslint-config: 2.0.13 ==> 2.0.15 minor
2020-05-03 18:30:25 +02:00
22633f0b1b only publish necessary files 2020-05-03 17:05:57 +02:00
fe6d23d5d3 update-scanner: automatic update
@scode/consts: 1.1.6 ==> 1.1.7 minor
@scode/crypto-helper: 1.1.33 ==> 1.1.34 minor
@scode/eslint-config: 2.0.12 ==> 2.0.13 minor
2020-05-02 17:13:56 +02:00
45299c49db update-scanner: automatic update
@scode/consts: 1.1.5 ==> 1.1.6 minor
@scode/crypto-helper: 1.1.32 ==> 1.1.33 minor
@scode/eslint-config: 2.0.11 ==> 2.0.12 minor
2020-04-28 08:01:56 +02:00
ae277f5bf9 update-scanner: automatic update
@scode/crypto-helper: 1.1.31 ==> 1.1.32 minor
ava: 3.8.0 ==> 3.8.1 minor
2020-04-27 14:10:29 +02:00
14d2978278 update-scanner: automatic update
@scode/crypto-helper: 1.1.30 ==> 1.1.31 minor
ava: 3.7.1 ==> 3.8.0 minor
2020-04-27 13:20:44 +02:00
77df83a01a update-scanner: automatic update
@scode/consts: 1.1.4 ==> 1.1.5 minor
@scode/crypto-helper: 1.1.29 ==> 1.1.30 minor
@scode/eslint-config: 2.0.10 ==> 2.0.11 minor
ava: 3.7.0 ==> 3.7.1 minor
2020-04-21 11:32:48 +02:00
0c78c811bd update-scanner: automatic update
@scode/consts: 1.0.17 ==> 1.1.4 minor
@scode/crypto-helper: 1.1.27 ==> 1.1.29 minor
@scode/eslint-config: 2.0.7 ==> 2.0.10 minor
ava: 3.6.0 ==> 3.7.0 minor
2020-04-14 15:55:05 +02:00
8972983080 fix lint script 2020-04-14 14:59:02 +02:00
deef29da3b update-scanner: automatic update
@scode/consts: 1.0.16 ==> 1.0.17 minor
@scode/crypto-helper: 1.1.26 ==> 1.1.27 minor
@scode/eslint-config: 2.0.6 ==> 2.0.7 minor
2020-04-09 09:54:00 +02:00
626ca64a96 update-scanner: automatic update 2020-04-08 13:22:06 +02:00
ebdac85909 update-scanner: automatic update 2020-04-06 10:16:50 +02:00
9f7567434c fix 2020-04-06 09:19:38 +02:00
15a1a6e83d update-scanner: automatic update 2020-04-06 08:07:23 +02:00
17a4c8f1ba add mutate script 2020-03-30 11:58:33 +02:00
14f30a1b96 update-scanner: automatic update 2020-03-30 08:47:11 +02:00
943e7f879e update-scanner: automatic update 2020-03-26 14:52:37 +01:00
4ac1b48f6c fix license 2020-03-25 16:59:18 +01:00
9329374b9c update-scanner: automatic update 2020-03-24 10:03:50 +01:00
e1311dfd31 update-scanner: automatic update 2020-03-24 09:44:38 +01:00
1f7c9c2d56 update-scanner: automatic update 2020-03-19 07:22:06 +01:00
5ea750462a update-scanner: automatic update 2020-03-14 14:34:23 +01:00
c7f3ffa742 add stryker 2020-03-14 14:14:23 +01:00
ae3cbf168e update-scanner: automatic update 2020-03-12 10:11:45 +01:00
0cd67742c2 update-scanner: automatic update 2020-03-12 09:45:25 +01:00
67e8acef5a update-scanner: automatic update 2020-03-12 09:38:22 +01:00
92934a2b92 update-scanner: automatic update 2020-03-12 09:33:49 +01:00
c116058565 revert to normal 2020-03-10 08:20:15 +01:00
f956ba16c6 [no publish] jenkins fix 2020-03-10 08:19:39 +01:00
c0016e676e Revert "fix lint"
This reverts commit e138879479.
2020-03-10 08:18:43 +01:00
18 changed files with 1585 additions and 2009 deletions

14
.drone.yml Normal file
View File

@ -0,0 +1,14 @@
kind: pipeline
name: default
steps:
- name: setup
image: registry:5000/node-build
commands:
- yarn
- curl https://git.scode.ovh/Timo/standard/raw/branch/master/ci.js > ci.js
- name: build
image: registry:5000/node-build
commands:
- node ci.js

1
.eslintignore Normal file
View File

@ -0,0 +1 @@
*.d.ts

View File

@ -1,17 +1,22 @@
/*
* Copyright (C) Sapphirecode - All Rights Reserved
* This file is part of auth-client-helper which is released under MIT.
* See file 'LICENSE' for full license details.
* Created by Timo Hocker <timo@scode.ovh>, May 2020
*/
'use strict';
module.exports = {
env: {
commonjs: true,
es6: true,
node: true
},
extends: [
'@scode'
],
extends: [ '@sapphirecode' ],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parserOptions: {
ecmaVersion: 2018
}
}
parserOptions: { ecmaVersion: 2018 }
};

2
.gitignore vendored
View File

@ -2,3 +2,5 @@
/dist/
/.nyc_output/
/coverage/
# stryker temp files
.stryker-tmp

8
.liconfig.json Normal file
View File

@ -0,0 +1,8 @@
{
"has_license": true,
"license": "MIT",
"author": "Timo Hocker",
"company": "Sapphirecode",
"email": "timo@scode.ovh",
"software": "auth-client-helper"
}

1
.npmrc
View File

@ -1 +0,0 @@
@scode:registry=https://npm.scode.ovh

11
CHANGELOG.md Normal file
View File

@ -0,0 +1,11 @@
# Changelog
## 1.1.0
- package updates
- documentation improvements
- better testing
## 1.0.0
initial release

23
Jenkinsfile vendored
View File

@ -1,23 +0,0 @@
pipeline {
agent any
environment {
VERSION = VersionNumber([
versionNumberString:
'${BUILDS_ALL_TIME}',
versionPrefix: '1.0.',
worstResultForIncrement: 'SUCCESS'
])
}
stages {
stage('Building') {
steps {
script {
currentBuild.displayName = env.VERSION
}
sh 'yarn ci ${VERSION}'
}
}
}
}

7
LICENSE Normal file
View File

@ -0,0 +1,7 @@
MIT License Copyright (c) <year> <author>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,15 +1,3 @@
# Auth Client Helper
# @sapphirecode/auth-client-helper
a module to make logging in to servers using the auth-server-helper easier
## Usage
```js
const client = require('@scode/auth-client-helper');
// if using in the browser, will send a request to the current host
const session_id = client.login('user','passw');
// specify a host manually
const session_id = client.login('user','passw','https://example.com');
```
Package deprecated due to the current auth-server-helper allowing users to define their own endpoints and not forcing a specific procedure anymore.

View File

@ -2,7 +2,7 @@
* Copyright (C) Sapphirecode - All Rights Reserved
* This file is part of auth-client-helper which is released under MIT.
* See file 'LICENSE' for full license details.
* Created by Timo Hocker <timo@scode.ovh>, March 2020
* Created by Timo Hocker <timo@scode.ovh>, May 2020
*/
/* eslint-disable no-magic-numbers */
@ -10,8 +10,8 @@
'use strict';
const crypto = require ('@scode/crypto-helper');
const consts = require ('@scode/consts');
const crypto = require ('@sapphirecode/crypto-helper');
const consts = require ('@sapphirecode/consts');
const fetch = require ('node-fetch');
/**

14
jasmine.json Normal file
View File

@ -0,0 +1,14 @@
{
"spec_dir": "test",
"spec_files": [
"spec/*.js",
"spec/*.ts"
],
"helpers": [
"helpers/*.js",
"helpers/*.ts"
],
"stopSpecOnExpectationFailure": false,
"random": false
}

View File

@ -1,28 +0,0 @@
/* eslint-disable no-process-exit */
/* eslint-disable no-console */
/* eslint-disable no-sync */
'use strict';
const fs = require ('fs');
const child_process = require ('child_process');
const pkg = JSON.parse (fs.readFileSync ('package.json', 'utf-8'));
[
,, pkg.version
] = process.argv;
fs.writeFileSync ('package.json', JSON.stringify (pkg, null, 2));
child_process.execSync ('yarn lint', { stdio: 'inherit' });
if (typeof pkg.scripts !== 'undefined' && typeof pkg.scripts.test === 'string')
child_process.execSync ('yarn test', { stdio: 'inherit' });
child_process.exec ('git log -1 | grep \'\\[no publish\\]\'')
.addListener ('exit', (code) => {
if (code === 0)
console.log ('build not marked for deployment');
// process.exit (1);
else
child_process.execSync ('yarn publish');
});

View File

@ -1,23 +1,45 @@
{
"name": "@scode/auth-client-helper",
"version": "1.0.0",
"name": "@sapphirecode/auth-client-helper",
"version": "1.1.3",
"main": "index.js",
"author": "Timo Hocker <t-hocker@web.de>",
"author": {
"name": "Timo Hocker",
"email": "timo@scode.ovh"
},
"bugs": "https://redmine.scode.ovh/projects/auth-client-helper",
"license": "MIT",
"description": "client helper to authenticate on servers using the auth-server-helper",
"repository": {
"type": "git",
"url": "https://git.scode.ovh:timo/auth-client-helper.git"
},
"devDependencies": {
"@scode/eslint-config": "^1.2.26",
"ava": "^3.5.0",
"eslint": "^6.8.0",
"nyc": "^15.0.0"
"@sapphirecode/eslint-config": "^2.1.4",
"@stryker-mutator/core": "^4.0.0",
"@types/jasmine": "^3.5.14",
"eslint": "^7.0.0",
"jasmine": "^3.6.1",
"nyc": "^15.0.1"
},
"scripts": {
"lint": "eslint .",
"test": "nyc ava",
"ci": "yarn && node jenkins.js"
"lint": "eslint . --ext .js,.jsx,.ts,.tsx,.vue,.mjs",
"test": "nyc jasmine --config=\"jasmine.json\"",
"mutate": "stryker run",
"compile": "tsc --allowJs --declaration --emitDeclarationOnly index.js"
},
"dependencies": {
"@scode/consts": "^1.0.3",
"@scode/crypto-helper": "^1.1.9",
"@sapphirecode/consts": "^1.1.18",
"@sapphirecode/crypto-helper": "^1.1.44",
"@stryker-mutator/jasmine-runner": "^4.0.0",
"node-fetch": "^2.6.0"
}
},
"files": [
"LICENSE",
"index.js"
],
"keywords": [
"authentication",
"helper",
"auth-server-helper"
]
}

23
stryker.conf.js Normal file
View File

@ -0,0 +1,23 @@
/*
* Copyright (C) Sapphirecode - All Rights Reserved
* This file is part of auth-client-helper which is released under MIT.
* See file 'LICENSE' for full license details.
* Created by Timo Hocker <timo@scode.ovh>, May 2020
*/
'use strict';
/**
* @type {import('@stryker-mutator/api/core').StrykerOptions}
*/
module.exports = {
packageManager: 'yarn',
reporters: [
'clear-text',
'progress'
],
testRunner: 'jasmine',
jasmineConfigFile: 'jasmine.json',
coverageAnalysis: 'perTest',
mutate: [ 'index.js' ]
};

View File

@ -1,50 +0,0 @@
// @ts-nocheck
'use strict';
const test = require ('ava');
const http = require ('http');
const client = require ('../index');
const consts = require ('@scode/consts');
test.before (() => {
http.createServer ((req, res) => {
let str = '';
if (req.headers.user)
str += req.headers.user;
if (req.headers.key)
str += req.headers.key;
res.writeHead (
req.headers.user === 'fail'
// eslint-disable-next-line max-len
|| req.headers.key === '73192367f6dde83a7e3c0bb412dff8e1b7dfbdb5e5010f00057f317b8eab68e8e448528303142c1455dfe72e062bb2e48f07441b38c7b65329ba7e5acbea6126'
? consts.http.status_forbidden
: consts.http.status_ok
);
res.end (str);
})
// eslint-disable-next-line no-magic-numbers
.listen (3000);
});
test ('send request', async (t) => {
const session = await client.login ('foo', 'bar', 'http://localhost:3000');
t.is (
session,
// eslint-disable-next-line max-len
'foo39082c11afda7a927fe4e23c5ba81b64186c33f7e58adf492be5a5c64ddc9db459e0778d573000a5ebaeeae902b6c8641198406b58bf9c53ce48ecdef73a33d1'
);
});
test ('fail salt', async (t) => {
await t.throwsAsync (
client.login ('fail', 'bar', 'http://localhost:3000')
);
});
test ('fail password', async (t) => {
await t.throwsAsync (
client.login ('foo', 'fail', 'http://localhost:3000')
);
});

62
test/spec/index.js Normal file
View File

@ -0,0 +1,62 @@
/*
* Copyright (C) Sapphirecode - All Rights Reserved
* This file is part of auth-client-helper which is released under MIT.
* See file 'LICENSE' for full license details.
* Created by Timo Hocker <timo@scode.ovh>, May 2020
*/
/* eslint-disable no-undef */
// @ts-nocheck
'use strict';
const http = require ('http');
const client = require ('../../index');
const consts = require ('@sapphirecode/consts');
describe ('client helper', () => {
beforeAll (() => {
http.createServer ((req, res) => {
let str = '';
if (req.headers.user)
str += req.headers.user;
if (req.headers.key)
str += req.headers.key;
res.writeHead (
req.headers.user === 'fail'
// eslint-disable-next-line max-len
|| req.headers.key === '73192367f6dde83a7e3c0bb412dff8e1b7dfbdb5e5010f00057f317b8eab68e8e448528303142c1455dfe72e062bb2e48f07441b38c7b65329ba7e5acbea6126'
? consts.http.status_forbidden
: consts.http.status_ok
);
res.end (str);
})
// eslint-disable-next-line no-magic-numbers
.listen (3000);
});
it ('should send request', async () => {
const session = await client.login ('foo', 'bar', 'http://localhost:3000');
expect (
session
)
.toEqual (
// eslint-disable-next-line max-len
'foo39082c11afda7a927fe4e23c5ba81b64186c33f7e58adf492be5a5c64ddc9db459e0778d573000a5ebaeeae902b6c8641198406b58bf9c53ce48ecdef73a33d1'
);
});
it ('should fail salt', async () => {
await expectAsync (
client.login ('fail', 'bar', 'http://localhost:3000')
)
.toBeRejectedWithError ('user or password invalid');
});
it ('should fail password', async () => {
await expectAsync (
client.login ('foo', 'fail', 'http://localhost:3000')
)
.toBeRejectedWithError ('user or password invalid');
});
});

3253
yarn.lock

File diff suppressed because it is too large Load Diff