Apache-AuthDigest
view release on metacpan or search on metacpan
Session/Session.pm view on Meta::CPAN
242526272829303132333435363738394041424344454647484950515253545556575859606162
my
$cfg
= Apache::ModuleConfig->get(
$r
, __PACKAGE__);
my
$key
=
$cfg
->{_session};
my
$nonce
=
$r
->notes(
$key
);
unless
(
$nonce
) {
$log
->info(
'Apache::AuthDigest::API::Session - no session found for '
,
"session key $key, using default request time instead"
);
return
$r
->SUPER::note_digest_auth_failure;
}
$log
->info(
"Apache::AuthDigest::API::Session - using notes() key $key "
,
"with session $nonce"
);
my
$auth_name
=
$r
->auth_name;
my
$header_type
=
$r
->proxyreq ?
'Proxy-Authenticate'
:
'WWW-Authenticate'
;
my
$header_info
=
qq!Digest realm="$auth_name", nonce="$nonce"!
;
$r
->err_headers_out->set(
$header_type
=>
$header_info
);
}
sub
compare_digest_response {
my
$r
=
shift
;
my
$rc
=
$r
->SUPER::compare_digest_response(
@_
);
return
unless
$rc
;
my
(
$key
,
$session
) =
$r
->get_session;
$r
->notes(
$key
=>
$session
);
return
$rc
;
}
( run in 0.304 second using v1.01-cache-2.11-cpan-26ccb49234f )