Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

UTL_HTTP.SET_AUTHENTICATION encoding

JSmydoSep 24 2014 — edited Sep 24 2014

Hi

I'm testing a Restful Service running via a standalone rest data service listener, invoking it from a PL/SQL procedure. The aim is to determine whether the the PL/SQL source of the resource handler can decode the authentication string in the header that was inserted via the UTL_HTTP.SET_AUTHENTICATION procedure using the Basic scheme. I currently have the following code within the resource handler:

       l_auth := owa_util.get_cgi_env('AUTHORIZATION');

       l_decode := utl_encode.text_decode(buf => substr(l_auth,6),encode_charset => l_charset, encoding => UTL_ENCODE.BASE64);

My assumption is that UTL_HTTP.SET_AUTHENTICATION uses a basic Base64 encoding for the username/password so have simply used the utl_encode.text_decode function hoping it was a straight text encoding. This isn't the case however and I can't uncover the original username/password text I've passed in. Are there further steps needed in the decoding process?

Thanks

John

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 22 2014
Added on Sep 24 2014
1 comment
1,575 views