@obelisk/auth
Advanced tools
Comparing version 2.0.0 to 3.0.0
@@ -295,3 +295,5 @@ var AuthEventType; | ||
ObeliskAuthClient.prototype.getHostUrl = function () { | ||
return this.config.host.endsWith('/') ? this.config.host.substr(0, this.config.host.length - 1) : this.config.host; | ||
return this.config.oblxHost.endsWith('/') | ||
? this.config.oblxHost.substr(0, this.config.oblxHost.length - 1) | ||
: this.config.oblxHost; | ||
}; | ||
@@ -302,3 +304,3 @@ /** | ||
ObeliskAuthClient.prototype.getAuthPath = function () { | ||
return this.config.httpBasePath; | ||
return this.config.oblxBasePath; | ||
}; | ||
@@ -353,3 +355,3 @@ /** | ||
response_type: 'code', | ||
redirect_uri: encodeURIComponent(this.config.redirectUri), | ||
redirect_uri: encodeURIComponent(this.config.clientRedirectUri), | ||
client_id: encodeURIComponent(this.config.clientId) | ||
@@ -382,3 +384,3 @@ }; | ||
response_type: 'code', | ||
redirect_uri: this.config.redirectUri, | ||
redirect_uri: this.config.clientRedirectUri, | ||
client_id: this.config.clientId | ||
@@ -455,4 +457,4 @@ }; | ||
ObeliskAuthClient.prototype.setConfigDefaults = function (config) { | ||
if (!config.redirectUri) { | ||
config.redirectUri = 'http://localhost:4200'; | ||
if (!config.clientRedirectUri) { | ||
config.clientRedirectUri = 'http://localhost:4200'; | ||
} | ||
@@ -459,0 +461,0 @@ return config; |
@@ -298,3 +298,5 @@ 'use strict'; | ||
ObeliskAuthClient.prototype.getHostUrl = function () { | ||
return this.config.host.endsWith('/') ? this.config.host.substr(0, this.config.host.length - 1) : this.config.host; | ||
return this.config.oblxHost.endsWith('/') | ||
? this.config.oblxHost.substr(0, this.config.oblxHost.length - 1) | ||
: this.config.oblxHost; | ||
}; | ||
@@ -305,3 +307,3 @@ /** | ||
ObeliskAuthClient.prototype.getAuthPath = function () { | ||
return this.config.httpBasePath; | ||
return this.config.oblxBasePath; | ||
}; | ||
@@ -356,3 +358,3 @@ /** | ||
response_type: 'code', | ||
redirect_uri: encodeURIComponent(this.config.redirectUri), | ||
redirect_uri: encodeURIComponent(this.config.clientRedirectUri), | ||
client_id: encodeURIComponent(this.config.clientId) | ||
@@ -385,3 +387,3 @@ }; | ||
response_type: 'code', | ||
redirect_uri: this.config.redirectUri, | ||
redirect_uri: this.config.clientRedirectUri, | ||
client_id: this.config.clientId | ||
@@ -458,4 +460,4 @@ }; | ||
ObeliskAuthClient.prototype.setConfigDefaults = function (config) { | ||
if (!config.redirectUri) { | ||
config.redirectUri = 'http://localhost:4200'; | ||
if (!config.clientRedirectUri) { | ||
config.clientRedirectUri = 'http://localhost:4200'; | ||
} | ||
@@ -462,0 +464,0 @@ return config; |
export interface ObeliskConfig { | ||
host: string; | ||
httpBasePath: string; | ||
oblxHost: string; | ||
oblxBasePath: string; | ||
clientHost: string; | ||
clientBasePath: string; | ||
clientRedirectUri: string; | ||
clientId: string; | ||
redirectUri?: string; | ||
} | ||
@@ -7,0 +9,0 @@ export interface Tokens { |
{ | ||
"name": "@obelisk/auth", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
147021
1125