hcloud-sdk 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/service/IDP.js +3 -3
- package/package.json +1 -1
package/lib/service/IDP.js
CHANGED
|
@@ -20,7 +20,7 @@ class IDP extends base_1.default {
|
|
|
20
20
|
* @returns User object
|
|
21
21
|
*/
|
|
22
22
|
this.authorize = () => __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
const resp = yield axios_1.default.post(this.getEndpoint("/v1/
|
|
23
|
+
const resp = yield axios_1.default.post(this.getEndpoint("/v1/authorize"), {}, {}).catch((err) => {
|
|
24
24
|
throw err;
|
|
25
25
|
});
|
|
26
26
|
return resp.data;
|
|
@@ -47,7 +47,7 @@ class IDP extends base_1.default {
|
|
|
47
47
|
* @returns Bearer Token
|
|
48
48
|
*/
|
|
49
49
|
this.authenticate = (email, password) => __awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
const resp = yield axios_1.default.post(this.getEndpoint("/v1/
|
|
50
|
+
const resp = yield axios_1.default.post(this.getEndpoint("/v1/authenticate"), { email: email, password: password }).catch((err) => {
|
|
51
51
|
throw err;
|
|
52
52
|
});
|
|
53
53
|
// tslint-disable: no-string-literal
|
|
@@ -61,7 +61,7 @@ class IDP extends base_1.default {
|
|
|
61
61
|
* @returns User object
|
|
62
62
|
*/
|
|
63
63
|
this.authenticateReturnUser = (email, password) => __awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
const resp = yield axios_1.default.post(this.getEndpoint("/v1/
|
|
64
|
+
const resp = yield axios_1.default.post(this.getEndpoint("/v1/authenticate"), { email: email, password: password }).catch((err) => {
|
|
65
65
|
throw err;
|
|
66
66
|
});
|
|
67
67
|
return resp.data;
|