Updated basic auth module, rename classes to use the prefix CMS_

Updated code based on comments
This commit is contained in:
jvelilla
2015-07-02 14:49:33 -03:00
parent 5288fe4d3c
commit 9d465b3d7e
11 changed files with 13 additions and 661 deletions

View File

@@ -7,7 +7,7 @@ note
revision: "$Revision: 96596 $"
class
BASIC_AUTH_MODULE
CMS_BASIC_AUTH_MODULE
inherit
CMS_MODULE
@@ -60,15 +60,15 @@ feature -- Access: filter
-- Possibly list of Filter's module.
do
create {ARRAYED_LIST [WSF_FILTER]} Result.make (2)
Result.extend (create {CORS_FILTER})
Result.extend (create {BASIC_AUTH_FILTER}.make (a_api))
Result.extend (create {CMS_CORS_FILTER})
Result.extend (create {CMS_BASIC_AUTH_FILTER}.make (a_api))
end
feature {NONE} -- Implementation: routes
configure_api_login (api: CMS_API; a_router: WSF_ROUTER)
local
l_bal_handler: BASIC_AUTH_LOGIN_HANDLER
l_bal_handler: CMS_BASIC_AUTH_LOGIN_HANDLER
l_methods: WSF_REQUEST_METHODS
do
create l_bal_handler.make (api)
@@ -79,7 +79,7 @@ feature {NONE} -- Implementation: routes
configure_api_logoff (api: CMS_API; a_router: WSF_ROUTER)
local
l_bal_handler: BASIC_AUTH_LOGOFF_HANDLER
l_bal_handler: CMS_BASIC_AUTH_LOGOFF_HANDLER
l_methods: WSF_REQUEST_METHODS
do
create l_bal_handler.make (api)
@@ -175,7 +175,7 @@ feature -- Hooks
a_block_id.is_case_insensitive_equal_general ("login") and then
a_response.location.starts_with ("account/roc-basic-auth")
then
a_response.add_javascript_url (a_response.url ("module/" + name + "/files/js/roc_auth.js", Void))
a_response.add_javascript_url (a_response.url ("module/" + name + "/files/js/roc_basic_auth.js", Void))
get_block_view_login (a_block_id, a_response)
end
end

View File

@@ -6,7 +6,7 @@ note
revision: "$Revision: 96616 $"
class
BASIC_AUTH_FILTER
CMS_BASIC_AUTH_FILTER
inherit
WSF_URI_TEMPLATE_HANDLER

View File

@@ -4,7 +4,7 @@ note
revision: "$Revision: 96085 $"
class
CORS_FILTER
CMS_CORS_FILTER
inherit

View File

@@ -1,10 +1,10 @@
note
description: "Summary description for {BASIC_AUTH_LOGIN_HANDLER}."
description: "Summary description for {CMS_BASIC_AUTH_LOGIN_HANDLER}."
date: "$Date: 2015-02-13 13:08:13 +0100 (ven., 13 févr. 2015) $"
revision: "$Revision: 96616 $"
class
BASIC_AUTH_LOGIN_HANDLER
CMS_BASIC_AUTH_LOGIN_HANDLER
inherit
CMS_HANDLER

View File

@@ -1,10 +1,10 @@
note
description: "Summary description for {BASIC_AUTH_LOGOFF_HANDLER}."
description: "Summary description for {CMS_BASIC_AUTH_LOGOFF_HANDLER}."
date: "$Date: 2015-02-13 13:08:13 +0100 (ven., 13 févr. 2015) $"
revision: "$Revision: 96616 $"
class
BASIC_AUTH_LOGOFF_HANDLER
CMS_BASIC_AUTH_LOGOFF_HANDLER
inherit
CMS_HANDLER