Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

casdoor-js-sdk

Package Overview
Dependencies
Maintainers
3
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

casdoor-js-sdk - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

2

lib/cjs/sdk.d.ts

@@ -31,5 +31,5 @@ export interface SdkConfig {

getUserProfileUrl(userName: string, account: Account): string;
getMyProfileUrl(account: Account): string;
getMyProfileUrl(account: Account, returnUrl?: String): string;
signin(serverUrl: string): Promise<Response>;
}
export default Sdk;

@@ -59,8 +59,14 @@ "use strict";

}
getMyProfileUrl(account) {
let param = "";
getMyProfileUrl(account, returnUrl = "") {
let params = "";
if (account !== undefined && account !== null) {
param = `?access_token=${account.accessToken}`;
params = `?access_token=${account.accessToken}`;
if (returnUrl !== "") {
params += `&return_url=${returnUrl}`;
}
}
return `${this.config.serverUrl.trim()}/account${param}`;
else if (returnUrl !== "") {
params = `?return_url=${returnUrl}`;
}
return `${this.config.serverUrl.trim()}/account${params}`;
}

@@ -67,0 +73,0 @@ signin(serverUrl) {

@@ -31,5 +31,5 @@ export interface SdkConfig {

getUserProfileUrl(userName: string, account: Account): string;
getMyProfileUrl(account: Account): string;
getMyProfileUrl(account: Account, returnUrl?: String): string;
signin(serverUrl: string): Promise<Response>;
}
export default Sdk;

@@ -57,8 +57,14 @@ // Copyright 2021 The casbin Authors. All Rights Reserved.

}
getMyProfileUrl(account) {
let param = "";
getMyProfileUrl(account, returnUrl = "") {
let params = "";
if (account !== undefined && account !== null) {
param = `?access_token=${account.accessToken}`;
params = `?access_token=${account.accessToken}`;
if (returnUrl !== "") {
params += `&return_url=${returnUrl}`;
}
}
return `${this.config.serverUrl.trim()}/account${param}`;
else if (returnUrl !== "") {
params = `?return_url=${returnUrl}`;
}
return `${this.config.serverUrl.trim()}/account${params}`;
}

@@ -65,0 +71,0 @@ signin(serverUrl) {

{
"name": "casdoor-js-sdk",
"version": "0.4.0",
"version": "0.5.0",
"description": "Javascript client SDK for Casdoor",

@@ -5,0 +5,0 @@ "main": "lib/cjs/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc