curtain-web-api 1.0.68 → 1.0.69

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.
@@ -109,7 +109,7 @@ export declare class CurtainWebAPI {
109
109
  getUserInfo(): Promise<User>;
110
110
  logout(): Promise<void>;
111
111
  refresh(): Promise<import("axios").AxiosResponse<any, any, {}>>;
112
- ORCIDLogin(authorizationCode: string, redirectURI: string): Promise<User>;
112
+ ORCIDLogin(authorizationCode: string, redirectURI: string, remember_me?: boolean): Promise<User>;
113
113
  checkIfRefreshTokenExpired(): boolean;
114
114
  deleteCurtainLink(curtainLinkID: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
115
115
  putSettings(settings: any, enable?: boolean, description?: string, sessionType?: string, encryption?: CurtainEncryption, permanent?: boolean, expiry_duration?: number, onUploadProgress?: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
@@ -160,13 +160,13 @@ export class CurtainWebAPI {
160
160
  return response;
161
161
  });
162
162
  }
163
- ORCIDLogin(authorizationCode, redirectURI) {
163
+ ORCIDLogin(authorizationCode, redirectURI, remember_me = false) {
164
164
  let headers = new AxiosHeaders();
165
165
  headers["Accept"] = "application/json";
166
166
  headers["Content-Type"] = "application/json";
167
167
  return this.user.loadFromDB().then((response) => {
168
168
  console.log(this.user);
169
- return this.axiosInstance.post(this.orcidLoginURL, JSON.stringify({ "auth_token": authorizationCode, "redirect_uri": redirectURI }), { headers: headers, responseType: "json" }).then((response) => {
169
+ return this.axiosInstance.post(this.orcidLoginURL, JSON.stringify({ "auth_token": authorizationCode, "redirect_uri": redirectURI, "remember_me": remember_me }), { headers: headers, responseType: "json" }).then((response) => {
170
170
  return this.user.saveIntoDB(response.data.access, response.data.refresh).then((response) => {
171
171
  console.log(this.user);
172
172
  return this.getUserInfo();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "curtain-web-api",
3
- "version": "1.0.68",
3
+ "version": "1.0.69",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./build/index.js",
@@ -277,14 +277,14 @@ export class CurtainWebAPI {
277
277
  });
278
278
  }
279
279
 
280
- ORCIDLogin(authorizationCode: string, redirectURI: string){
280
+ ORCIDLogin(authorizationCode: string, redirectURI: string, remember_me: boolean = false){
281
281
  let headers = new AxiosHeaders();
282
282
  headers["Accept"] = "application/json";
283
283
  headers["Content-Type"] = "application/json";
284
284
  return this.user.loadFromDB().then(
285
285
  (response) => {
286
286
  console.log(this.user)
287
- return this.axiosInstance.post(this.orcidLoginURL, JSON.stringify({"auth_token": authorizationCode, "redirect_uri": redirectURI}), {headers: headers, responseType:"json"}).then((response) => {
287
+ return this.axiosInstance.post(this.orcidLoginURL, JSON.stringify({"auth_token": authorizationCode, "redirect_uri": redirectURI, "remember_me": remember_me}), {headers: headers, responseType:"json"}).then((response) => {
288
288
  return this.user.saveIntoDB(response.data.access, response.data.refresh).then((response) => {
289
289
  console.log(this.user)
290
290
  return this.getUserInfo()