[Auth_Custom] checks the current authentication values which were sent with the HTTP header. If they correspond to the specified username and password then the page is processed normally. The username will be compared case insensitive and the password will be compare case sensitive.
Otherwise, the visitor is prompted with an authentication dialog. They will not be able to see the page which contains this method unless they provide the specified username and password.
The optional realm parameter will be used by the client's Web browser to identify how the username and password will be used. If the same realm parameter is used on multiple pages the browser will re-transmit the username and password automatically without re-prompting the client. The realm defaults to 'Lasso Security'.
The [Auth_Custom] method will usually be one of the first methods in a file.
The username and password can alternately be specified as arrays in order to allow one of a number of users to view a page. Both arrays should be of the same length. The username will be found in the first array and the matching element in the second array will be checked to see if the password matches.
If a codeblock is passed via the -authtag keyword parameter, then the password will be evaluated using the specified codeblock.
auth_custom('Username', 'Password', -Realm='Realm')
auth_custom(
array('Username1','Username2'),
array('Password1','Password2'),
-Realm='Realm'
)
auth_custom(
username,
password,
-realm = string,
-BASIC = boolean,
-nonce = string,
-opaque = string,
-stale = boolean,
-transparent = boolean,
-noabort = boolean,
-errorresponse = string,
-noresponse = boolean
)
auth_custom(
username,
-authtag = codeblock,
-realm = string,
-BASIC = boolean,
-nonce = string,
-opaque = string,
-stale = boolean,
-transparent = boolean,
-noabort = boolean,
-errorresponse = string,
-noresponse = boolean
)
Use the [Auth_Custom] method with a custom username, password, and realm as a parameters.
Each visitor will need to enter this username and password in order to view the contents of the Web page. This method is useful for authenticating a user that is not necessarily configured in Lasso Security. The custom realm will be displayed in the authentication dialog box when the user logs in, and can be used in conjunction with other realms on the Web server.
Code
Auth_Custom('Custom_User_Name', 'Custom_Password', 'Custom_Realm')
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft
Recent Comments