diff --git a/infos.js b/infos.js index 5c503f1..7aac5d2 100644 --- a/infos.js +++ b/infos.js @@ -1,17 +1,10 @@ -var oauthServerUrl="http://localhost:9001/iroh/oauth2/authorize"; +var oauthServerUrl="https://visibility.amp.cisco.com/iroh/oauth2/authorize"; +var oauthServerTokenUrl="https://visibility.amp.cisco.com/iroh/oauth2/token"; +var resourceProviderTestEndpoint="https://private.intel.amp.cisco.com:443/ctia/judgement/judgement-000013f9-4d39-427e-8bbc-bf987a5d867b"; var response_type="code"; -var client_id="localtest"; -var client_password = "localpass"; -var redirect_uri="http://localhost:9999/login.html"; -var scopes=["casebook" - ,"collect" - ,"global-intel" - ,"private-intel" - ,"enrich" - ,"inspect" - ,"integration" - ,"iroh-auth" - ,"response" - ,"ui-settings"]; +var client_id="client-id"; +var client_password = "password"; +var redirect_uri="http://localhost:9988/login.html"; +var scopes=["ctia"]; var scope=scopes.join(" "); var state="whatever"; diff --git a/login.html b/login.html index 085ad2d..5f4534e 100644 --- a/login.html +++ b/login.html @@ -48,6 +48,7 @@ onclick="makeApiCall();"> Make an API call with the access token +
Nothing yet.
Nothing yet.

Getting new access token without user interaction

The access tokens are the only tokens which are able to talk to the @@ -113,7 +114,7 @@ var getTokensFromCode = function() { var tokparams={ "code":params.code - , "redirect_uri":"http://localhost:9999/login.html" + , "redirect_uri":redirect_uri , "scope":scope , "client_id":client_id , "grant_type":"authorization_code" @@ -136,7 +137,7 @@ , beforeSend: function(request) {request.setRequestHeader("Authorization","Basic " + btoa(client_id + ":" + client_password))} , success: onSuccess , error: onError - , url: "http://localhost:9001/iroh/oauth2/token" + , url: oauthServerTokenUrl , data: tokparams , contentType: 'application/x-www-form-urlencoded; charset=UTF-8' , crossDomain: true @@ -164,7 +165,7 @@ , beforeSend: function(request) {request.setRequestHeader("Authorization","Basic " + btoa(client_id + ":" + client_password))} , success: onSuccess , error: onError - , url: "http://localhost:9001/iroh/oauth2/token" + , url: oauthServerTokenUrl , data: tokparams , contentType: 'application/x-www-form-urlencoded; charset=UTF-8' , crossDomain: true @@ -184,7 +185,7 @@ , beforeSend: function(request) {request.setRequestHeader("Authorization","Bearer " + accessToken)} , success: onSuccess , error: onError - , url: "http://localhost:9001/iroh/iroh-ui-settings/whoami" + , url: resourceProviderTestEndpoint , contentType: 'application/json' , crossDomain: true });