Forum Discussion
sam_111661
Nimbostratus
Dec 02, 2008HTTP::cookie and decryption
I'm trying to avoid authenticating each and every get / post in the HTTP request using cookies, I would be grateful if anybody could explain to me whats wrong here
The domain is correct, the cl...
sam_111661
Nimbostratus
Dec 03, 2008If I use the AES::decrypt everything works fine but I understand from the wiki that the recommended method is HTTP::cookie decrypt
set ::key [AES::key 128]
if {[HTTP::cookie exists $ckname]} {
set encrypted [HTTP::cookie $ckname]
log "cookie sent by client is [HTTP::cookie $ckname]"
set decrypted [AES::decrypt $::key [b64decode $encrypted]]
log "decrypted cookie is $decrypted"
if {$decrypted eq $ckvalue} {
set forceauth 0
}
when HTTP_RESPONSE {
if {$authinsck eq 1} {
set encrypted [b64encode [AES::encrypt $::key $ckvalue]]
HTTP::cookie insert name "$ckname" value $encrypted domain $ckdomain
log "cookie sent by bigip is $encrypted"
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects