ltm rule command HTTP username
iRule(1) BIG-IP TMSH Manual iRule(1)
HTTP::username
Returns the username part of HTTP basic authentication.
SYNOPSIS
HTTP::username
DESCRIPTION
Returns the username part of HTTP basic authentication. As described in RFC2617 the username and password in basic
authentication is sent by the client in the Authorization header. The client base64 encodes the username and password in
the format of: Authorization: Basic base64encoding(username:password) The HTTP::username command parses and base64 decodes
the username. The HTTP::password command parses and base64 decodes the password.
Syntax
HTTP::username
* Returns the username part of HTTP basic authentication.
RETURN VALUE
Returns the username part of HTTP basic authentication
VALID DURING
CACHE_REQUEST, CACHE_RESPONSE, HTTP_REQUEST, HTTP_REQUEST_DATA, HTTP_REQUEST_SEND, HTTP_RESPONSE, HTTP_RESPONSE_CONTINUE,
HTTP_RESPONSE_DATA
EXAMPLES
# Small chunk of an iRule for radius authentication
when HTTP_REQUEST {
AUTH::username_credential $auth_sid [HTTP::username]
AUTH::password_credential $auth_sid [HTTP::password]
}
when CLIENT_ACCEPTED {
set auth_sid [AUTH::start pam default_radius]
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-9.0.0 --First introduced the command.
BIG-IP 2022-04-12 iRule(1)