AUTH::wantcredential_type

Description

Returns the authorization session authid’s credential type that the system last requested (when the system generated an AUTH_WANTCREDENTIAL event). The value of the <authid> argument is either username, password, x509, x509_issuer, or unknown, based upon the system’s assessment of the credential prompt string and style.

Syntax

AUTH::wantcredential_type <authid>

AUTH::wantcredential_type <authid>

  • Returns the authorization session authid’s credential type that the system last requested (when the system generated an AUTH_WANTCREDENTIAL event). The value of the <authid> argument is either username, password, x509, x509_issuer, or ‘’’unknown*.

Examples

when AUTH_WANTCREDENTIAL {
  HTTP::respond 401 "WWW-Authenticate" "Basic realm=\"\""
}
when AUTH_FAILURE {
  log local0. "Auth failed: \
       Auth type was \"[AUTH::wantcredential_type $authid]\" \
       Auth prompt was \"[AUTH::wantcredential_prompt $authid]\"\
       Auth prompt style was \"[AUTH::wantcredential_prompt_style $authid]\"\
"
}