@@ -157,7 +157,7 @@ static int oidc_proto_request_form_post_param_add(void *rec, const char *key, co
157157/*
158158 * make the browser POST parameters through Javascript auto-submit
159159 */
160- static int oidc_proto_request_html_post (request_rec * r , const char * url , apr_table_t * params ) {
160+ static void oidc_proto_request_html_post (request_rec * r , const char * url , apr_table_t * params ) {
161161
162162 oidc_debug (r , "enter" );
163163
@@ -174,7 +174,7 @@ static int oidc_proto_request_html_post(request_rec *r, const char *url, apr_tab
174174 " </p>\n"
175175 " </form>\n" );
176176
177- return oidc_util_html_send (r , "Submitting..." , NULL , "document.forms[0].submit" , html_body , OK );
177+ oidc_util_html_send (r , "Submitting..." , NULL , "document.forms[0].submit" , html_body , OK );
178178}
179179
180180#define OIDC_REQUEST_OJBECT_COPY_FROM_REQUEST "copy_from_request"
@@ -688,8 +688,12 @@ int oidc_proto_request_auth(request_rec *r, struct oidc_provider_t *provider, co
688688 if (oidc_proto_profile_auth_request_method_get (provider ) == OIDC_AUTH_REQUEST_METHOD_POST ) {
689689
690690 /* construct a HTML POST auto-submit page with the authorization request parameters */
691- rv =
692- oidc_proto_request_html_post (r , oidc_cfg_provider_authorization_endpoint_url_get (provider ), params );
691+ oidc_proto_request_html_post (r , oidc_cfg_provider_authorization_endpoint_url_get (provider ), params );
692+
693+ /* signal this to the content handler */
694+ oidc_request_state_set (r , OIDC_REQUEST_STATE_KEY_AUTHN_POST , "" );
695+ r -> user = "" ;
696+ rv = OK ;
693697
694698 } else if (oidc_proto_profile_auth_request_method_get (provider ) == OIDC_AUTH_REQUEST_METHOD_PAR ) {
695699
@@ -701,7 +705,6 @@ int oidc_proto_request_auth(request_rec *r, struct oidc_provider_t *provider, co
701705 authorization_request =
702706 oidc_http_query_encoded_url (r , oidc_cfg_provider_authorization_endpoint_url_get (provider ), params );
703707
704- // TODO: should also enable this when using the POST binding for the auth request
705708 /* see if we need to preserve POST parameters through Javascript/HTML5 storage */
706709 if (oidc_response_post_preserve_javascript (r , authorization_request , NULL , NULL ) == FALSE) {
707710
@@ -714,7 +717,7 @@ int oidc_proto_request_auth(request_rec *r, struct oidc_provider_t *provider, co
714717 } else {
715718
716719 /* signal this to the content handler */
717- oidc_request_state_set (r , OIDC_REQUEST_STATE_KEY_AUTHN , "" );
720+ oidc_request_state_set (r , OIDC_REQUEST_STATE_KEY_AUTHN_PRESERVE , "" );
718721 r -> user = "" ;
719722 rv = OK ;
720723 }
0 commit comments