071 deep debug
This commit is contained in:
+22
-4
@@ -38,6 +38,20 @@
|
||||
<cfset request.DS = "#this.datasource#"/>
|
||||
<cfset request.language=""/>
|
||||
<cfset getDS(this.datasource)/>
|
||||
|
||||
<cfset this.datasources["inmem"] = {
|
||||
class: "org.hsqldb.jdbcDriver",
|
||||
// Внимание на jdbc:hsqldb:mem:
|
||||
connectionString: "jdbc:hsqldb:mem:lucee_mem;shutdown=false",
|
||||
username: "sa",
|
||||
password: "",
|
||||
// Защита от "висяка" и исчезновения базы:
|
||||
// заставляем Lucee держать минимум 1 коннект открытым всегда
|
||||
connectionLimit: 5,
|
||||
connectionMin: 1
|
||||
}
|
||||
/><!--- inmemory DB --->
|
||||
|
||||
<!--- кажется, нужно инициализировать датасорцы в псевдоконструкторе - onRequest не получается --->
|
||||
<!--- *** проверить, что есть - если есть, не создавать --->
|
||||
|
||||
@@ -94,7 +108,7 @@
|
||||
|
||||
<!--- global settings --->
|
||||
<cfset request.RECORDS_PER_PAGE=500/>
|
||||
<cfset request.APP_VERSION="0.00.030"/>
|
||||
<cfset request.APP_VERSION="0.00.031"/>
|
||||
<cfheader name="X-Application-Version" value=#request.APP_VERSION#/>
|
||||
<cfset request.STAND=getStand()/>
|
||||
|
||||
@@ -155,8 +169,8 @@
|
||||
--->
|
||||
<!--- <cfoutput>onRequest:check for cert started #(getTickCount()-request.startTickCount)#</cfoutput> --->
|
||||
<cfset var idpCertificateExists = false/>
|
||||
<cflock scope="application" type="readonly" timeout=1>
|
||||
<cfset request.APP_NAME=this.Name/>
|
||||
<cflock scope="application" type = "readonly" timeout=1>
|
||||
<cfset request.APP_NAME = this.Name/>
|
||||
<cfset idpCertificateExists = structKeyExists(application,"idpCertificate")/>
|
||||
</cflock>
|
||||
|
||||
@@ -196,14 +210,17 @@
|
||||
<cfscript>
|
||||
var requestData = GetHttpRequestData();
|
||||
var headers = requestData.headers;
|
||||
var local_token = false; //для отладки мы можем использовать токен из окружения, но когда он истекает, это легко упустить и потом искать проблему
|
||||
|
||||
//var authorizationHeader = server.system.environment?.AUTHORIZATION;
|
||||
|
||||
if (structKeyExists(headers,"Authorization")) {
|
||||
request.auth_header = headers.Authorization;
|
||||
//writedump(headers.Authorization);
|
||||
} else {
|
||||
//request.auth_header = createObject("java", "java.lang.System").getEnv("AUTHORIZATION");
|
||||
request.auth_header = server.system.environment?.AUTHORIZATION; //так короче
|
||||
local_token = true;
|
||||
if (isNull(request.auth_header)){ /*for local debug we can inject long-living token into environment*/
|
||||
structDelete(request,"auth_header");
|
||||
} else {
|
||||
@@ -236,8 +253,9 @@
|
||||
if (prefix.status_code NEQ 200) {
|
||||
//writedump(this.iamServiceUrl);
|
||||
//writedump(resp);
|
||||
//abort;
|
||||
var iamStatusCode = (isValid("integer", prefix.status_code)) ? val(prefix.status_code) : 500;
|
||||
throw(message="IAM error", detail="URL: #this.iamServiceUrl# Status Code: #prefix.status_code#");
|
||||
throw(message="IAM error", detail="local_token: #local_token# URL: #this.iamServiceUrl# Status Code: #prefix.status_code#");
|
||||
//abort;
|
||||
//throw("IDP response not OK");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user