Skip to main content
OCLC Support

Validate

Learn how to use the Validate config.txt directive to specify a username and password to submit using HTTP basic authentication in EZproxy.

Validate specifies a username and password to submit using HTTP basic authentication when accessing remote web servers. Validate without any options restores the default behavior of not using HTTP basic authentication. Validate applies to the remote web servers that are authorized by Domain, DomainJavaScript, Host, HostJavaScript, and URL directives that follow the Validate directive but appear within a single database stanza.

The Validate directive only works when a web server issues an HTTP basic authentication challenge. This form of web server authentication causes a browser to produce a pop-up challenge in a window titled “Authentication Required” or “Connect to www.somedb.com”. The Validate directive does not perform automatic logging into web sites that generate their own custom web pages to request usernames and passwords.

Validate is a repeatable position-dependent config.txt directive that interacts with database stanzas in the scope of the current database stanza.

Options

Option Description
Path= wildpath If included, specifies that the path of the URL being retrieved must wildcard match this path. The wildpath may include * to match 0 or more characters and ? to match any single character.
username:password The username and password to submit to the remote web server when retrieving web content.

Syntax

Validate [[Path= wildpath] username:password]

Examples

Specify that EZproxy should send someuser as the username and somepass as the password when accessing hosts that are part of Some Database. AutoLoginIP is employed to transparently proxy local users who access this resource, allowing someuser and somepass to be handled automatically. ExcludeIP directs EZproxy to reroute access for local users who access Other Database or any other databases that Other Database instead of transparently proxying access to these databases.

AutoLoginIP 192.168.0.0-192.168.255.255
Title Some Database
Validate someuser:somepass
URL http://www.somedb.com
D somedb.com
ExcludeIP 192.168.0.0-192.168.255.255
Title Other Database
URL http://www.otherdb.com
D otherdb.com

Specify that EZproxy should send someuser as the username and somepass as the password for URLs within http://www.somedb.com/ secure/ but not for any other URL within the somedb.com domain. The first Validate directive sets up the restriction for / secure/ and the second Validate directive specifies that no special username or password processing should occur for any other host that is authorized by the final Domain directive.

Title Some Database
Validate Path=/secure/* someuser:somepass
URL http://www.somedb.com
Validate
Domain somedb.com