AUTHT_PROVIDER_VERSION);
if (!provider || !provider->check_token) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01616)
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(10424)
"No Autht provider configured");
auth_result = AUTHT_GENERAL_ERROR;
break;
switch (auth_result) {
case AUTHT_DENIED:
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO()
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(10425)
"bearer token %s: authentication failure for \"%s\": "
"Token Rejected",
sent_token, r->uri);
return_code = HTTP_UNAUTHORIZED;
break;
case AUTHT_EXPIRED:
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO()
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(10426)
"bearer token %s: authentication failure for \"%s\": "
"Token has expired",
sent_token, r->uri);
return_code = HTTP_UNAUTHORIZED;
break;
case AUTHT_INVALID:
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO()
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(10427)
"bearer token %s: authentication failure for \"%s\": "
"Token is not yet valid",
sent_token, r->uri);
return_code = HTTP_UNAUTHORIZED;
break;
case AUTHT_MISMATCH:
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO()
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(10428)
"bearer token %s: did not match '%s': %s", sent_token,
ap_auth_name(r), r->uri);
return_code = HTTP_UNAUTHORIZED;
token = ap_expr_str_exec(r, conf->proxy, &err);
if (err) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02455)
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(10429)
"AuthBearerProxy: could not evaluate token expression for URI '%s': %s", r->uri, err);
return HTTP_INTERNAL_SERVER_ERROR;
}
if (!token || !*token) {
- ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02458)
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(10430)
"AuthBearerProxy: empty token expression for URI '%s', ignoring", r->uri);
apr_table_unset(r->headers_in, "Authorization");
NULL);
apr_table_setn(r->headers_in, "Authorization", auth_line);
- ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02457)
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(10431)
"AuthBearerProxy: \"Authorization: %s\"",
auth_line);
rv = apr_crypto_init(p);
if (APR_SUCCESS != rv) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
- APLOGNO() "APR crypto could not be initialised");
+ APLOGNO(10432) "APR crypto could not be initialised");
return rv;
}
&err, p);
if (APR_EREINIT == rv) {
ap_log_error(APLOG_MARK, APLOG_WARNING, rv, s,
- APLOGNO() "warning: crypto for '%s' was already initialised, " "using existing configuration",
+ APLOGNO(10433) "warning: crypto for '%s' was already initialised, " "using existing configuration",
conf->library);
rv = APR_SUCCESS;
}
if (APR_SUCCESS != rv && err) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
- APLOGNO() "The crypto library '%s' could not be loaded: %s (%s: %d)",
+ APLOGNO(10434) "The crypto library '%s' could not be loaded: %s (%s: %d)",
conf->library, err->msg, err->reason, err->rc);
return rv;
}
if (APR_ENOTIMPL == rv) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
- APLOGNO() "The crypto library '%s' could not be found",
+ APLOGNO(10435) "The crypto library '%s' could not be found",
conf->library);
return rv;
}
if (APR_SUCCESS != rv || !driver) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
- APLOGNO() "The crypto library '%s' could not be loaded",
+ APLOGNO(10436) "The crypto library '%s' could not be loaded",
conf->library);
return rv;
}
rv = apr_crypto_make(conf->crypto, driver, conf->params, p);
if (APR_SUCCESS != rv) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
- APLOGNO() "The crypto library '%s' could not be initialised",
+ APLOGNO(10437) "The crypto library '%s' could not be initialised",
conf->library);
return rv;
}
ap_log_error(APLOG_MARK, APLOG_INFO, rv, s,
- APLOGNO() "The crypto library '%s' was loaded successfully",
+ APLOGNO(10438) "The crypto library '%s' was loaded successfully",
conf->library);
}
value = ap_expr_str_exec(r, val, &err);
if (err) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO()
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(10439)
"AuthtJwtClaim: could not evaluate '%s' expression "
"'%s' for URI '%s': %s",
(char * )key, (char * )val, r->uri, err);
if (!conf->claims || !apr_hash_count(conf->claims)) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_SUCCESS, r,
- APLOGNO() "AuthtJwtClaim: could not encode a JWT token for URI '%s': no claims",
+ APLOGNO(10440) "AuthtJwtClaim: could not encode a JWT token for URI '%s': no claims",
r->uri);
return "error:no-claims";
}
if (APR_SUCCESS != status) {
const apu_err_t *err = apr_jose_error(&jws);
ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
- APLOGNO() "AuthtJwtClaim: could not encode a JWT token for URI '%s': %s: %s",
+ APLOGNO(10441) "AuthtJwtClaim: could not encode a JWT token for URI '%s': %s: %s",
r->uri, err->msg, err->reason);
return "error:could-not-encode";
}
if (APR_SUCCESS != status) {
const apu_err_t *err = apr_jose_error(jose);
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r,
- APLOGNO() "AuthtJwt: could not decode a JWT token for URI '%s': %s: %s",
+ APLOGNO(10442) "AuthtJwt: could not decode a JWT token for URI '%s': %s: %s",
r->uri, err->msg, err->reason);
return AUTHT_DENIED;
}
if (jose->type != APR_JOSE_TYPE_JWT) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r,
- APLOGNO() "AuthtJwt: JOSE token was not a JWT token for URI '%s'",
+ APLOGNO(10443) "AuthtJwt: JOSE token was not a JWT token for URI '%s'",
r->uri);
return AUTHT_DENIED;
}
if (!aud) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r,
- APLOGNO() "AuthtJwt: JWT token 'aud' value was missing and did not match AuthName '%s' for URI '%s'",
+ APLOGNO(10444) "AuthtJwt: JWT token 'aud' value was missing and did not match AuthName '%s' for URI '%s'",
ap_auth_name(r), r->uri);
return AUTHT_MISMATCH;
}
if (strcmp(aud, ap_auth_name(r))) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r,
- APLOGNO() "AuthtJwt: JWT token 'aud' value '%s' did not match AuthName '%s' for URI '%s'",
+ APLOGNO(10445) "AuthtJwt: JWT token 'aud' value '%s' did not match AuthName '%s' for URI '%s'",
aud, ap_auth_name(r), r->uri);
return AUTHT_MISMATCH;
}
if (exp_set &&
exp < apr_time_sec(now)) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r,
- APLOGNO() "AuthtJwt: JWT token is expired (%"
+ APLOGNO(10446) "AuthtJwt: JWT token is expired (%"
APR_INT64_T_FMT " < %" APR_TIME_T_FMT ") for URI '%s'",
exp, apr_time_sec(now), r->uri);
return AUTHT_EXPIRED;
if (nbf_set &&
nbf > apr_time_sec(now)) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r,
- APLOGNO() "AuthtJwt: JWT token is not yet valid (%"
+ APLOGNO(10447) "AuthtJwt: JWT token is not yet valid (%"
APR_INT64_T_FMT " > %" APR_TIME_T_FMT ") for URI '%s'",
nbf, apr_time_sec(now), r->uri);
return AUTHT_INVALID;