Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Authorization returning null
Was testing a new local environment the other day and kept getting an unauthorised response.
Worked through it step by step, for example hadn't added the AdditionalValues into the registry.
Once that was all said and done though, whilst debugging, I could see the request, I could see the AdditionalValues including the Authorization but in http_authentication_services the
was returning null as was the subsequent check for 'X-Authorization'.
In this case I could see that it didn't get blocked by IIS or anything else because the header was visible in the request. Any thoughts on why the call the http_services to get the value would return null?
Worked through it step by step, for example hadn't added the AdditionalValues into the registry.
Once that was all said and done though, whilst debugging, I could see the request, I could see the AdditionalValues including the Authorization but in http_authentication_services the
AuthorizationB64 = HTTP_Services('GetRequestHeaderField', 'Authorization')
was returning null as was the subsequent check for 'X-Authorization'.
In this case I could see that it didn't get blocked by IIS or anything else because the header was visible in the request. Any thoughts on why the call the http_services to get the value would return null?
Comments
Don, you crack me up. You didn't think I was going to make it that easy for you did you?
Actually not my laptop and no logging wasn't turned on so
I'll have access again next week but it was a low priority last minute "let's see if we can get this to work before we take off home" type scenario.
I'll debug and log further next week if we can prioritise the time. Really just throwing this out there in case anything readily came to mind and a null AuthorizationB64 value was the last thing I saw before we packed up.
Well actually I saw it, which triggered the light bulb that we hadn't added AdditionalValues to the registry so we did that and saw the values come through but still got null.
I'll debug the setrequestheaderfields logic next time and see if the answer presents itself.
…. not to say you're not still smarter than that but...
Some time ago I changed http_services so that the oecgiRegKey is dynamic so far as which version of the oecgi you were using.
Unfortunately that means that if you're using oecgi4 but your env record says you're using oecgi3 the registry won't be read and the SetRequestHeaderFields won't know to store your additionalValues away. Don't store them away, can't read them later.
Somehow I don't think you would have found that one Don.
Is Don. Is Good.
but you're not that good that you could imagine the mods I made two and a half years ago and couldn't remember myself.
That said, I haven't really updated it anywhere in production either. Can't remember how to check.
In production it must be v1