Skip to content

Commit a443fb2

Browse files
committed
Making setup easer.
1 parent e9c12c1 commit a443fb2

File tree

1 file changed

+14
-7
lines changed
  • src/JavaScriptClient/wwwroot

1 file changed

+14
-7
lines changed

src/JavaScriptClient/wwwroot/app.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
function log() {
1+
var authority = "https://login.xena.biz";
2+
var client_id = "41eb10a8-7d7a-47ed-9cc4-8e1bfae2df25.xena.biz";
3+
var redirect_uri = "http://localhost:5003/callback.html";
4+
var post_logout_redirect_uri = "http://localhost:5003/index.html";
5+
var scopes = "openid profile testapi";
6+
var XenaAPIEndpoint = "https://www.xena.biz";
7+
8+
function log() {
29
document.getElementById("results").innerText = "";
310

411
Array.prototype.forEach.call(arguments, function (msg) {
@@ -17,12 +24,12 @@ document.getElementById("api").addEventListener("click", api, false);
1724
document.getElementById("logout").addEventListener("click", logout, false);
1825

1926
var config = {
20-
authority: "https://login.xena.biz",
21-
client_id: "[Set Your Client Id here]",
22-
redirect_uri: "http://localhost:5003/callback.html",
27+
authority: authority,
28+
client_id: client_id,
29+
redirect_uri: redirect_uri,
2330
response_type: "id_token token",
24-
scope: "openid profile testapi",
25-
post_logout_redirect_uri: "http://localhost:5003/index.html",
31+
scope: scopes,
32+
post_logout_redirect_uri: post_logout_redirect_uri
2633
};
2734
var mgr = new Oidc.UserManager(config);
2835

@@ -41,7 +48,7 @@ function login() {
4148

4249
function api() {
4350
mgr.getUser().then(function (user) {
44-
var url = "https://login.xena.biz/connect/userinfo";
51+
var url = XenaAPIEndpoint + "/Api/User/XenaUserMembership?ForceNoPaging=true";
4552

4653
var xhr = new XMLHttpRequest();
4754
xhr.open("GET", url);

0 commit comments

Comments
 (0)