fixed conf

This commit is contained in:
Yann Esposito (Yogsototh) 2018-04-19 16:43:15 +02:00
parent 6cd9b523e8
commit 8b75b87327
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646
2 changed files with 12 additions and 18 deletions

View file

@ -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 response_type="code";
var client_id="localtest"; var client_id="client-id";
var client_password = "localpass"; var client_password = "password";
var redirect_uri="http://localhost:9999/login.html"; var redirect_uri="http://localhost:9988/login.html";
var scopes=["casebook" var scopes=["ctia"];
,"collect"
,"global-intel"
,"private-intel"
,"enrich"
,"inspect"
,"integration"
,"iroh-auth"
,"response"
,"ui-settings"];
var scope=scopes.join(" "); var scope=scopes.join(" ");
var state="whatever"; var state="whatever";

View file

@ -48,6 +48,7 @@
onclick="makeApiCall();"> onclick="makeApiCall();">
Make an API call with the access token Make an API call with the access token
</div> </div>
<pre id="apiurl" class="code">Nothing yet.</pre>
<pre id="apiresponse" class="code">Nothing yet.</pre> <pre id="apiresponse" class="code">Nothing yet.</pre>
<h2>Getting new access token without user interaction</h2> <h2>Getting new access token without user interaction</h2>
<p> The access tokens are the only tokens which are able to talk to the <p> The access tokens are the only tokens which are able to talk to the
@ -113,7 +114,7 @@
var getTokensFromCode = function() { var getTokensFromCode = function() {
var tokparams={ var tokparams={
"code":params.code "code":params.code
, "redirect_uri":"http://localhost:9999/login.html" , "redirect_uri":redirect_uri
, "scope":scope , "scope":scope
, "client_id":client_id , "client_id":client_id
, "grant_type":"authorization_code" , "grant_type":"authorization_code"
@ -136,7 +137,7 @@
, beforeSend: function(request) {request.setRequestHeader("Authorization","Basic " + btoa(client_id + ":" + client_password))} , beforeSend: function(request) {request.setRequestHeader("Authorization","Basic " + btoa(client_id + ":" + client_password))}
, success: onSuccess , success: onSuccess
, error: onError , error: onError
, url: "http://localhost:9001/iroh/oauth2/token" , url: oauthServerTokenUrl
, data: tokparams , data: tokparams
, contentType: 'application/x-www-form-urlencoded; charset=UTF-8' , contentType: 'application/x-www-form-urlencoded; charset=UTF-8'
, crossDomain: true , crossDomain: true
@ -164,7 +165,7 @@
, beforeSend: function(request) {request.setRequestHeader("Authorization","Basic " + btoa(client_id + ":" + client_password))} , beforeSend: function(request) {request.setRequestHeader("Authorization","Basic " + btoa(client_id + ":" + client_password))}
, success: onSuccess , success: onSuccess
, error: onError , error: onError
, url: "http://localhost:9001/iroh/oauth2/token" , url: oauthServerTokenUrl
, data: tokparams , data: tokparams
, contentType: 'application/x-www-form-urlencoded; charset=UTF-8' , contentType: 'application/x-www-form-urlencoded; charset=UTF-8'
, crossDomain: true , crossDomain: true
@ -184,7 +185,7 @@
, beforeSend: function(request) {request.setRequestHeader("Authorization","Bearer " + accessToken)} , beforeSend: function(request) {request.setRequestHeader("Authorization","Bearer " + accessToken)}
, success: onSuccess , success: onSuccess
, error: onError , error: onError
, url: "http://localhost:9001/iroh/iroh-ui-settings/whoami" , url: resourceProviderTestEndpoint
, contentType: 'application/json' , contentType: 'application/json'
, crossDomain: true , crossDomain: true
}); });