Http Authentication Keepalive - Cisco 11503 - CSS Content Services Switch Administration Manual

Content services switch
Hide thumbs Also See for 11503 - CSS Content Services Switch:
Table of Contents

Advertisement

Script Keepalive Examples

HTTP Authentication Keepalive

Cisco Content Services Switch Administration Guide
8-58
! Done
no set EXIT_MSG
socket disconnect ${SOCKET}
exit script 0
!no echo
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Filename: ap-kal-httpauth
! Parameters: HostName WebPage Username-Password
!
! Description:
!
This will keepalive an authentication connection by building
!
a get request with the Authentication field filled with the
!
Username-Password string formatted like so: "bob:mypassword"
!
This is critical to make the authentication base64 hash work
!
correctly.
!
! Note: This script authentication is based on HTTP AUTHENTICATION
!
RFC-2617.
Currently only supported option is "Basic"
!
authentication using base64 encoding.
!
not supported at this time.
!
! Failure Upon:
!
1. Not establishing a connection with the host.
!
2. Not being able authenticated with the Username-Password
!
(not being given a status code of "200 OK"
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if ${ARGS}[#] "NEQ" "3"
echo "Usage: ap-kal-httpauth \'Hostname WebPage
Username:Password\'"
echo "(Ie. ap-kal-httpauth \'192.168.1.1 /index.html
bob:mypassword\')"
exit script 1
endbranch
! Defines:
set HostName "${ARGS}[1]"
set WebPage "${ARGS}[2]"
set UserPass "${ARGS}[3]"
! Connect to the remote Host
set EXIT_MSG "Connection Failure"
socket connect host ${HostName} port 80 tcp
Chapter 8
Using the CSS Scripting Language
"Digest" Access is
OL-5647-02

Advertisement

Table of Contents
loading

This manual is also suitable for:

11500 series

Table of Contents