@@ -407,8 +407,9 @@ apr_byte_t oidc_set_app_claims(request_rec *r, oidc_cfg_t *cfg, const char *s_cl
407407
408408 /* set the resolved claims a HTTP headers for the application */
409409 if (j_claims != NULL ) {
410- oidc_util_set_app_infos (r , j_claims , oidc_cfg_claim_prefix_get (cfg ), oidc_cfg_claim_delimiter_get (cfg ),
411- pass_in , oidc_cfg_dir_pass_info_encoding_get (r ));
410+ oidc_util_appinfo_set_all (r , j_claims , oidc_cfg_claim_prefix_get (cfg ),
411+ oidc_cfg_claim_delimiter_get (cfg ), pass_in ,
412+ oidc_cfg_dir_pass_info_encoding_get (r ));
412413
413414 /* release resources */
414415 json_decref (j_claims );
@@ -613,39 +614,39 @@ apr_byte_t oidc_session_pass_tokens(request_rec *r, oidc_cfg_t *cfg, oidc_sessio
613614 const char * refresh_token = oidc_session_get_refresh_token (r , session );
614615 if ((oidc_cfg_dir_pass_refresh_token_get (r ) != 0 ) && (refresh_token != NULL )) {
615616 /* pass it to the app in a header or environment variable */
616- oidc_util_set_app_info (r , OIDC_APP_INFO_REFRESH_TOKEN , refresh_token , OIDC_DEFAULT_HEADER_PREFIX ,
617- pass_in , encoding );
617+ oidc_util_appinfo_set (r , OIDC_APP_INFO_REFRESH_TOKEN , refresh_token , OIDC_DEFAULT_HEADER_PREFIX ,
618+ pass_in , encoding );
618619 }
619620
620621 /* set the access_token in the app headers/variables */
621622 const char * access_token = oidc_session_get_access_token (r , session );
622623 if ((oidc_cfg_dir_pass_access_token_get (r ) != 0 ) && access_token != NULL ) {
623624 /* pass it to the app in a header or environment variable */
624- oidc_util_set_app_info (r , OIDC_APP_INFO_ACCESS_TOKEN , access_token , OIDC_DEFAULT_HEADER_PREFIX , pass_in ,
625- encoding );
625+ oidc_util_appinfo_set (r , OIDC_APP_INFO_ACCESS_TOKEN , access_token , OIDC_DEFAULT_HEADER_PREFIX , pass_in ,
626+ encoding );
626627 }
627628
628629 /* set the access_token type in the app headers/variables */
629630 const char * access_token_type = oidc_session_get_access_token_type (r , session );
630631 if ((oidc_cfg_dir_pass_access_token_get (r ) != 0 ) && access_token_type != NULL ) {
631632 /* pass it to the app in a header or environment variable */
632- oidc_util_set_app_info (r , OIDC_APP_INFO_ACCESS_TOKEN_TYPE , access_token_type ,
633- OIDC_DEFAULT_HEADER_PREFIX , pass_in , encoding );
633+ oidc_util_appinfo_set (r , OIDC_APP_INFO_ACCESS_TOKEN_TYPE , access_token_type , OIDC_DEFAULT_HEADER_PREFIX ,
634+ pass_in , encoding );
634635 }
635636
636637 /* set the expiry timestamp in the app headers/variables */
637638 const char * access_token_expires = oidc_session_get_access_token_expires2str (r , session );
638639 if ((oidc_cfg_dir_pass_access_token_get (r ) != 0 ) && access_token_expires != NULL ) {
639640 /* pass it to the app in a header or environment variable */
640- oidc_util_set_app_info (r , OIDC_APP_INFO_ACCESS_TOKEN_EXP , access_token_expires ,
641- OIDC_DEFAULT_HEADER_PREFIX , pass_in , encoding );
641+ oidc_util_appinfo_set (r , OIDC_APP_INFO_ACCESS_TOKEN_EXP , access_token_expires ,
642+ OIDC_DEFAULT_HEADER_PREFIX , pass_in , encoding );
642643 }
643644
644645 /* set the scope in the app headers/variables alongside of the access token, if enabled */
645646 const char * scope = oidc_session_get_scope (r , session );
646647 if ((oidc_cfg_dir_pass_access_token_get (r ) != 0 ) && scope != NULL ) {
647648 /* pass it to the app in a header or environment variable */
648- oidc_util_set_app_info (r , OIDC_APP_INFO_SCOPE , scope , OIDC_DEFAULT_HEADER_PREFIX , pass_in , encoding );
649+ oidc_util_appinfo_set (r , OIDC_APP_INFO_SCOPE , scope , OIDC_DEFAULT_HEADER_PREFIX , pass_in , encoding );
649650 }
650651
651652 if (extend_session ) {
@@ -740,9 +741,9 @@ static int oidc_handle_existing_session(request_rec *r, oidc_cfg_t *cfg, oidc_se
740741 oidc_debug (r , "dir_action_on_error_refresh: %d" , oidc_cfg_dir_action_on_error_refresh_get (r ));
741742 OIDC_METRICS_COUNTER_INC (r , cfg , OM_SESSION_ERROR_REFRESH_ACCESS_TOKEN );
742743 if (oidc_cfg_dir_action_on_error_refresh_get (r ) == OIDC_ON_ERROR_LOGOUT ) {
743- return oidc_logout_request (
744- r , cfg , session , oidc_util_url_abs (r , cfg , oidc_cfg_default_slo_url_get (cfg )),
745- FALSE);
744+ return oidc_logout_request (r , cfg , session ,
745+ oidc_util_url_abs (r , cfg , oidc_cfg_default_slo_url_get (cfg )),
746+ FALSE);
746747 }
747748 if (oidc_cfg_dir_action_on_error_refresh_get (r ) == OIDC_ON_ERROR_AUTH ) {
748749 oidc_session_kill (r , session );
@@ -758,9 +759,9 @@ static int oidc_handle_existing_session(request_rec *r, oidc_cfg_t *cfg, oidc_se
758759 oidc_debug (r , "action_on_userinfo_error: %d" , oidc_cfg_action_on_userinfo_error_get (cfg ));
759760 OIDC_METRICS_COUNTER_INC (r , cfg , OM_SESSION_ERROR_REFRESH_USERINFO );
760761 if (oidc_cfg_action_on_userinfo_error_get (cfg ) == OIDC_ON_ERROR_LOGOUT ) {
761- return oidc_logout_request (
762- r , cfg , session , oidc_util_url_abs (r , cfg , oidc_cfg_default_slo_url_get (cfg )),
763- FALSE);
762+ return oidc_logout_request (r , cfg , session ,
763+ oidc_util_url_abs (r , cfg , oidc_cfg_default_slo_url_get (cfg )),
764+ FALSE);
764765 }
765766 if (oidc_cfg_action_on_userinfo_error_get (cfg ) == OIDC_ON_ERROR_AUTH ) {
766767 oidc_session_kill (r , session );
@@ -785,17 +786,17 @@ static int oidc_handle_existing_session(request_rec *r, oidc_cfg_t *cfg, oidc_se
785786
786787 if ((oidc_cfg_dir_pass_idtoken_as_get (r ) & OIDC_PASS_IDTOKEN_AS_PAYLOAD )) {
787788 /* pass the id_token JSON object to the app in a header or environment variable */
788- oidc_util_set_app_info (r , OIDC_APP_INFO_ID_TOKEN_PAYLOAD , s_id_token , OIDC_DEFAULT_HEADER_PREFIX ,
789- pass_in , encoding );
789+ oidc_util_appinfo_set (r , OIDC_APP_INFO_ID_TOKEN_PAYLOAD , s_id_token , OIDC_DEFAULT_HEADER_PREFIX ,
790+ pass_in , encoding );
790791 }
791792
792793 if ((oidc_cfg_dir_pass_idtoken_as_get (r ) & OIDC_PASS_IDTOKEN_AS_SERIALIZED )) {
793794 /* get the compact serialized JWT from the session */
794795 s_id_token = oidc_session_get_idtoken (r , session );
795796 if (s_id_token ) {
796797 /* pass the compact serialized JWT to the app in a header or environment variable */
797- oidc_util_set_app_info (r , OIDC_APP_INFO_ID_TOKEN , s_id_token , OIDC_DEFAULT_HEADER_PREFIX ,
798- pass_in , encoding );
798+ oidc_util_appinfo_set (r , OIDC_APP_INFO_ID_TOKEN , s_id_token , OIDC_DEFAULT_HEADER_PREFIX ,
799+ pass_in , encoding );
799800 } else {
800801 oidc_warn (r , "id_token was not found in the session so it cannot be passed on" );
801802 }
0 commit comments