char *context; /* Context string from AuthExternalContext */
int groupsatonce; /* Check all groups in one call? */
int providecache; /* Provide auth data to mod_authn_socache? */
+ int authncheck; /* Check for previous authentication? */
} authnz_external_dir_config_rec;
dir->context= NULL; /* no default */
dir->groupsatonce= 1; /* default to on */
dir->providecache= 0; /* default to off */
+ dir->authncheck= 1; /* default to on */
return dir;
}
(void *)APR_OFFSETOF(authnz_external_dir_config_rec, groupsatonce),
OR_AUTHCFG,
"Old version of 'GroupExternalManyAtOnce'" ),
+
+ AP_INIT_FLAG("GroupExternalAuthNCheck",
+ ap_set_flag_slot,
+ (void *)APR_OFFSETOF(authnz_external_dir_config_rec, authncheck),
+ OR_AUTHCFG,
+ "Set to 'off' if group authenticator should skip checking whether "
+ "user is validly authenticated"),
{ NULL }
};
const char *t, *w;
int code;
- /* If no authenticated user, pass */
- if ( !user ) return AUTHZ_DENIED_NO_USER;
+ if (dir->authncheck){
+ /* If no authenticated user, pass */
+ if ( !user ) return AUTHZ_DENIED_NO_USER;
+ }else{
+ /* Prevent crash due to missing user */
+ if ( !user ) r->user = "";
+ }
/* If no external authenticator has been configured, pass */
if ( !extname ) return AUTHZ_DENIED;
const char *t, *w;
int code;
- /* If no authenticated user, pass */
- if ( !user ) return AUTHZ_DENIED_NO_USER;
+ if (dir->authncheck){
+ /* If no authenticated user, pass */
+ if ( !user ) return AUTHZ_DENIED_NO_USER;
+ }else{
+ /* Prevent crash due to missing user */
+ if ( !user ) r->user = "";
+ }
/* If no external authenticator has been configured, pass */
if ( !extname ) return AUTHZ_DENIED;