diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2010-01-24 16:21:11 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2010-01-24 16:21:11 +0100 |
commit | 0cd3f65d05e7d966ff66d2aa97908332eb2d6c06 (patch) | |
tree | dfaa9b7d376cba31436e72655df018d128337187 /README | |
parent | c3c4d481079f2a24ea16cd49b785b6f358a28fc9 (diff) | |
parent | 67c68ee643eaef16277fa614d873dd558bfdbd04 (diff) |
merge in pawelz' authentication handler + some other fixes
Diffstat (limited to 'README')
-rw-r--r-- | README | 43 |
1 files changed, 43 insertions, 0 deletions
@@ -513,9 +513,52 @@ The script specific arguments are: - `$8 URI` of the page to be navigated to +* authentication handler: + + $8 authentication zone unique identifier + $9 domain part of URL that requests authentication + $10 authentication realm + $11 FALSE if this is the first attempt to authenticate, TRUE otherwise + Custom, userdefined scripts (`spawn foo bar`) get first the arguments as specified in the config and then the above 7 are added at the end. +### HTTP/BASIC AUTHENTICATION ### + +If authentication_handler variable is not set, http authentication is handled +internally by WebKit. If you want to use custom script for http authentication, +set authentication_handler. For example: + + set authentication_handler = sync_spawn /patch/to/your/script + +Script will be executed on each authentication request. +It will receive four auth-related parameters: + + $8 authentication zone unique identifier (may be used as 'key') + $9 domain part of URL that requests authentication + $10 authentication realm + $11 FALSE if this is the first attempt to authenticate, TRUE otherwise + +Script is expected to print exactly two lines of text on stdout (that means +its output must contain exactly two '\n' bytes). +The first line contains username, the second one - password. +If authentication fails, script will be executed again (with $11 = TRUE). +Non-interactive scripts should handle this case and do not try to +authenticate again to avoid loops. If number of '\n' characters in scripts +output does not equal 2, authentication will fail. +That means 401 error will be displayed and uzbl won't try to authenticate anymore. + +The simplest example of authentication handler script is: + +#!/bin/sh +[ "$11" == "TRUE ] && exit +echo alice +echo wonderland + +This script tries to authenticate as user alice with password wonderland once +and never retries authentication. +See examples for more sofisticated, interactive authentication handler. + ### JAVASCRIPT HELPER OBJECT DISABLED BECAUSE OF SECURITY LEAK JavaScript code run from `uzbl` is given a special object in the global |