Improved session auth module routing.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
note
|
note
|
||||||
description: "Module Auth"
|
description: "Module Auth"
|
||||||
date: "$Date$"
|
date: "$Date: 2016-04-13 10:59:18 +0200 (mer., 13 avr. 2016) $"
|
||||||
revision: "$Revision$"
|
revision: "$Revision: 98616 $"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_AUTHENTICATION_MODULE
|
CMS_AUTHENTICATION_MODULE
|
||||||
@@ -159,7 +159,7 @@ feature -- Hooks configuration
|
|||||||
l_url_name := "site_sign_in_url"
|
l_url_name := "site_sign_in_url"
|
||||||
l_url := a_response.url (roc_login_location, Void)
|
l_url := a_response.url (roc_login_location, Void)
|
||||||
end
|
end
|
||||||
if l_destination /= Void then
|
if l_destination /= Void and then not l_url.has_substring ("?destination") then
|
||||||
l_url.append ("?destination=" + percent_encoded (l_destination))
|
l_url.append ("?destination=" + percent_encoded (l_destination))
|
||||||
end
|
end
|
||||||
a_value.force (l_url, l_url_name)
|
a_value.force (l_url, l_url_name)
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ note
|
|||||||
This module allows the use Session Based Authentication using Cookies to restrict access
|
This module allows the use Session Based Authentication using Cookies to restrict access
|
||||||
by looking up users in the given providers.
|
by looking up users in the given providers.
|
||||||
]"
|
]"
|
||||||
date: "$Date$"
|
date: "$Date: 2016-04-13 10:59:18 +0200 (mer., 13 avr. 2016) $"
|
||||||
revision: "$Revision$"
|
revision: "$Revision: 98616 $"
|
||||||
|
|
||||||
class
|
class
|
||||||
CMS_SESSION_AUTH_MODULE
|
CMS_SESSION_AUTH_MODULE
|
||||||
@@ -115,7 +115,7 @@ feature -- Access: router
|
|||||||
if attached session_api as l_session_api then
|
if attached session_api as l_session_api then
|
||||||
a_router.handle ("/" + login_location, create {WSF_URI_AGENT_HANDLER}.make (agent handle_login (a_api, ?, ?)), a_router.methods_head_get)
|
a_router.handle ("/" + login_location, create {WSF_URI_AGENT_HANDLER}.make (agent handle_login (a_api, ?, ?)), a_router.methods_head_get)
|
||||||
a_router.handle ("/" + logout_location, create {WSF_URI_AGENT_HANDLER}.make (agent handle_logout (a_api, l_session_api, ?, ?)), a_router.methods_get_post)
|
a_router.handle ("/" + logout_location, create {WSF_URI_AGENT_HANDLER}.make (agent handle_logout (a_api, l_session_api, ?, ?)), a_router.methods_get_post)
|
||||||
a_router.handle ("/account/auth/roc-session-login", create {WSF_URI_TEMPLATE_AGENT_HANDLER}.make (agent handle_login_with_session (a_api,session_api, ?, ?)), a_router.methods_get_post)
|
a_router.handle ("/" + login_location, create {WSF_URI_AGENT_HANDLER}.make (agent handle_login_with_session (a_api,session_api, ?, ?)), a_router.methods_post)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user