[ALX] 2016-03-17 10:18:00
This package is licensed unter MIT
----
** NAME **
http::auth - wrapper for "http::geturl" with automatic http authentication
** SYNOPSIS **
: package require http::auth ?1.0?
: http::auth::geturl url ?options?
: http::auth::config name value
** DESCRIPTION **
RFC 2617 HTTP Authentication: Basic and Digest Access Authentication
** EXAMPLE **
'''simple username and password'''
<
>
======
package require http::auth
::http::auth::config username USER
::http::auth::config password PASS
::http::geturl http://wiki.tcl.tk -keepalive 1
======
'''realm-based authentication'''
<
>
======
package require http::auth
proc ::http::auth::callback { realm *username *password } {
variable options
upvar ${*username} username
upvar ${*password} password
switch -- $realm {
default {
set username USER
set password PW
}
}
}
::http::geturl http://wiki.tcl.tk -keepalive 1
======
** LEGAL NOTICE **
Copyright (C) 2016 Alexander Schoepe
<> Protocol | Internet | Package | Web | Security