Added CMS_API.request: WSF_REQUEST to ease dev of ROC CMS code.

- Removed CMS_REQUEST_UTIL
  - centralize a few request related code into CMS_API
Added CMS_API.user, CMS_API.set_user (CMS_USER), ... and user related routines.

Refactored Auth related code
  - added various abstractions to factorize implementation and harmonize solutions.
  - revisited the logout strategy.
  - updated the account info page, and remove info user should not care about.
  - simplified the process, and encourage auth module to follow same design.

Added CMS_LINK helper routines to modify the related query string.
Removed CMS_USER.profile (and related routines)
   - It was not used so far.
   - it will probably a specific module later, if needed.

Update various module to avoid fetching user from sql directly, and let this task to CMS_USER_API.

Removed CMS_NODE_API.node_author (a_node: CMS_NODE): detachable CMS_USER,
   - as the info is already in CMS_NODE.author

Added CMS_RESPONSE.redirection_delay, if ever one code want to redirect after a few seconds.
Added the request uri info to the not found cms response.
This commit is contained in:
2016-01-29 21:58:49 +01:00
parent 41ac45d07b
commit 3496536751
67 changed files with 1742 additions and 1820 deletions

View File

@@ -9,7 +9,7 @@ class
CMS_OPENID_API
inherit
CMS_MODULE_API
CMS_AUTH_API_I
REFACTORING_HELPER
@@ -27,7 +27,7 @@ feature {NONE} -- Initialization
make (a_api)
-- Initialize openid related settings.
s := a_api.setup.string_8_item ("auth.openid.token")
s := a_api.setup.string_8_item ("auth." + {CMS_OPENID_MODULE}.name + ".token")
if s = Void then
s := a_api.setup.site_id + default_session_token_suffix
end
@@ -40,7 +40,7 @@ feature {NONE} -- Initialization
session_max_age := 3600 --| one hour: *60(min) *60(sec)
end
ensure
openid_storage_set: openid_storage = a_openid_storage
openid_storage_set: openid_storage = a_openid_storage
end
feature {CMS_MODULE} -- Access: User openid storage.
@@ -87,7 +87,6 @@ feature -- Access: Consumers OAuth20
feature -- Change: User Openid
new_user_openid (a_identity: READABLE_STRING_GENERAL; a_user: CMS_USER)
-- Add a new user with openid using the identity `a_identity'.
require