diff options
Diffstat (limited to 'module/consumer.cc')
-rw-r--r-- | module/consumer.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/module/consumer.cc b/module/consumer.cc index e4d2906..3d1686c 100644 --- a/module/consumer.cc +++ b/module/consumer.cc @@ -641,3 +641,26 @@ sid_consumer_authenticate(sid_request_t *req, sid_storage_t *store, begin_auth (req, consumer, trust_root, identity, attributes); } } + +void +sid_consumer_redirect_after (sid_request_t *req) +{ + assert (req); + + const char *qs = sid_request_qs (req); + + params_t params; + parse_query_string (qs, params); + + params_t unused; + filter_prefixed_params (params, unused, "openid."); + + string url = sid_request_url (req, 1); + if (!params.empty()) + url = params.append_query (url, ""); + + sid_request_respond_headers (req, 302, "Found", + "Location", url.c_str(), + "Cache-Control", "no-cache", + NULL); +} |