@ughuuu/game_server 1.0.131 → 1.0.134
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/dist/api/UsersApi.js +4 -12
- package/package.json +1 -1
package/dist/api/UsersApi.js
CHANGED
|
@@ -45,22 +45,15 @@ var UsersApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
45
45
|
/**
|
|
46
46
|
* Return current user info
|
|
47
47
|
* Returns the current authenticated user's basic information.
|
|
48
|
-
* @param {String} authorization Bearer token
|
|
49
48
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetCurrentUser200Response} and HTTP response
|
|
50
49
|
*/
|
|
51
50
|
return _createClass(UsersApi, [{
|
|
52
51
|
key: "getCurrentUserWithHttpInfo",
|
|
53
|
-
value: function getCurrentUserWithHttpInfo(
|
|
52
|
+
value: function getCurrentUserWithHttpInfo() {
|
|
54
53
|
var postBody = null;
|
|
55
|
-
// verify the required parameter 'authorization' is set
|
|
56
|
-
if (authorization === undefined || authorization === null) {
|
|
57
|
-
throw new Error("Missing the required parameter 'authorization' when calling getCurrentUser");
|
|
58
|
-
}
|
|
59
54
|
var pathParams = {};
|
|
60
55
|
var queryParams = {};
|
|
61
|
-
var headerParams = {
|
|
62
|
-
'Authorization': authorization
|
|
63
|
-
};
|
|
56
|
+
var headerParams = {};
|
|
64
57
|
var formParams = {};
|
|
65
58
|
var authNames = ['authorization'];
|
|
66
59
|
var contentTypes = [];
|
|
@@ -72,13 +65,12 @@ var UsersApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
72
65
|
/**
|
|
73
66
|
* Return current user info
|
|
74
67
|
* Returns the current authenticated user's basic information.
|
|
75
|
-
* @param {String} authorization Bearer token
|
|
76
68
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetCurrentUser200Response}
|
|
77
69
|
*/
|
|
78
70
|
}, {
|
|
79
71
|
key: "getCurrentUser",
|
|
80
|
-
value: function getCurrentUser(
|
|
81
|
-
return this.getCurrentUserWithHttpInfo(
|
|
72
|
+
value: function getCurrentUser() {
|
|
73
|
+
return this.getCurrentUserWithHttpInfo().then(function (response_and_data) {
|
|
82
74
|
return response_and_data.data;
|
|
83
75
|
});
|
|
84
76
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ughuuu/game_server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.134",
|
|
4
4
|
"description": "API for Game Server application ## Authentication This API uses JWT (JSON Web Tokens) with access and refresh tokens: ### Getting Tokens - **Email/Password**: POST to `/api/v1/login` with email and password - **Discord OAuth**: Use `/api/v1/auth/discord` flow - **Google OAuth**: Use `/api/v1/auth/google` flow - **Facebook OAuth**: Use `/api/v1/auth/facebook` flow - **Apple Sign In**: Use `/auth/apple` browser flow (API flow not yet implemented) Both methods return: - `access_token` - Short-lived (15 min), use for API requests - `refresh_token` - Long-lived (30 days), use to get new access tokens ### Using Tokens Include the access token in the Authorization header: ``` Authorization: Bearer <access_token> ``` ### Refreshing Tokens When your access token expires, use POST `/api/v1/refresh` with your refresh token to get a new access token. ## Endpoints All API endpoints are under `/api/v1` ",
|
|
5
5
|
"license": "Unlicense",
|
|
6
6
|
"main": "dist/index.js",
|