profoundjs 7.1.0 → 7.1.2
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.
|
@@ -91,7 +91,13 @@ function start(request, response) {
|
|
|
91
91
|
message = String(err);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
let urlErrStr = "";
|
|
95
|
+
if (typeof formdata.url !== "string" || formdata.url.length < 1) {
|
|
96
|
+
urlErrStr = `<p class="error">This sample app requires an "authorizationUrl" property to be defined for the OAuth2
|
|
97
|
+
provider. Please check your openapi.json file and compare with the sample in the README.md file.</p>`;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const responseHTML = `${HTML_HEAD}
|
|
95
101
|
<script type="text/javascript">
|
|
96
102
|
function init(){
|
|
97
103
|
/* Store value that are only available to pages in the same origin as this page. */
|
|
@@ -101,6 +107,10 @@ function init(){
|
|
|
101
107
|
}
|
|
102
108
|
</script>
|
|
103
109
|
<style type="text/css">
|
|
110
|
+
p.error {
|
|
111
|
+
color: red;
|
|
112
|
+
white-space: normal;
|
|
113
|
+
}
|
|
104
114
|
pre {
|
|
105
115
|
color: #999999;
|
|
106
116
|
}
|
|
@@ -129,9 +139,11 @@ div#pui {
|
|
|
129
139
|
|
|
130
140
|
<input type="submit" value="Sign On" class="pui-solid-button-yes blueprint-defaults" id="submit" />
|
|
131
141
|
</form>
|
|
142
|
+
${urlErrStr}
|
|
132
143
|
<pre>${message}</pre>
|
|
133
144
|
</div>
|
|
134
|
-
${HTML_TAIL}
|
|
145
|
+
${HTML_TAIL}`;
|
|
146
|
+
response.send(responseHTML);
|
|
135
147
|
}
|
|
136
148
|
|
|
137
149
|
/**
|
|
@@ -104,6 +104,11 @@ mod.fetchTokensAsync = async function(code, codver) {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
let responseData;
|
|
107
|
+
if (typeof this.tokenUrl !== "string" || this.tokenUrl.length < 1) {
|
|
108
|
+
throw new Error(`This sample app requires a "tokenUrl" property to be defined for the OAuth2
|
|
109
|
+
provider. Please check your openapi.json file and compare with the sample in the README.md file.`);
|
|
110
|
+
}
|
|
111
|
+
|
|
107
112
|
try {
|
|
108
113
|
responseData = await profound.httpRequest({
|
|
109
114
|
method: "POST",
|
package/setup/pjsdist.savf
CHANGED
|
Binary file
|