Jump to content

Basic Auth with TuniURLFrame


Harry Rogers

Recommended Posts

Hi

 

Is there a means to set the authorization header when using a TUniURLFrame?

I need to access some resources in a unigui app that are 'protected' by http authentication and I don't want the user to have ready access to the credentials / or require them to type anything in.

- it used to be possible to enter these in the url (//username:password@theurl) but that's been long deprecated.

 

Thank you

Link to comment
Share on other sites

Hi

When a user access a url that is protected with this mechanism they are presented with a username & password dialog - by the browser.

A client can included the credentials in the request header.

 

The simplest implementation (basic access authentication) uses the authorization header field of the http request

e.g. the request header contains

 Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l

where QW.... is the username and password string, base64 encoded.

 

Subsequent versions have been defined e.g. Digest access authentication

in which the username and password are hashed.

 

I wanted to prevent the 'browser', a TUniURLFrame in my case, from popping up the dialog to request credentials, and have them silently presented via the request header.

 

Thanks 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...