Perform a basic auth check.
This tag returns a 401 response if basic auth isn't supplied.
If basic auth credentials are included in the request, they are decoded and the enclosed block is executed with the variables username
and password
. The enclosed block can then use the <denied> tag to reject bad credentials. Here is an example:
<auth-check><denied if="[username, password] != ['john', 'iloveaeryn']" /></auth-check>
name | purpose | type | required? | default | choices |
---|---|---|---|---|---|
realm |
Basic auth realm | text | No | "restricted" |
name | purpose | type | required? | default | choices |
---|---|---|---|---|---|
if |
Conditional expression | expression | No | yes |