Package com.simplicite.util
Class PlatformHooks
- java.lang.Object
-
- com.simplicite.util.engine.PlatformHooksInterface
-
- com.simplicite.util.PlatformHooks
-
- Direct Known Subclasses:
ScriptedPlatformHooks
public class PlatformHooks extends com.simplicite.util.engine.PlatformHooksInterface
Platform hooks wrapper to manage one singleton per class-loader
-
-
Constructor Summary
Constructors Constructor Description PlatformHooks()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
clearCache()
Clear singleton.java.lang.String
customAuth(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Custom authentication default implementation:
Try to get login from an authentication header (denoted by theAUTH_HEADER
system parameter)
Then try to get login from an authentication cookie (denoted by theAUTH_COOKIE
system parameter)
Then optionally check authentication origin (denoted by theAUTH_ORIGIN
system parameter)
Note: login processing itself is then supposed to be done in theparseAuth
hookvoid
customAuthPage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String error)
This method is called to generate a custom authentication page response.void
customStartPage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Custom start page.static ScriptedPlatformHooks
getInstance()
Get singleton instance.static void
init()
Init singleton.-
Methods inherited from class com.simplicite.util.engine.PlatformHooksInterface
canPreviewDocument, changeScope, checkMFA, downloadDocument, event, generatePassword, getAuthTokenInfo, init, initMFA, isMenuEnable, logout, parseAuth, postAuth, postAuth, postClearCache, postLoadGrant, postLoadHome, postLoadLogEvents, postLoadMenu, postLoadProfile, postLoadResponsibilities, postLoadScope, postLoadSystemParams, postPlatformInit, postSearchIndex, postSearchIndex, preAuth, preAuth, preClearCache, preLoadGrant, preLoadHome, preLoadLogEvents, preLoadMenu, preLoadProfile, preLoadResponsibilities, preLoadSystemParams, preSearchIndex, preSearchIndex, sendSMS, socialPost, socialPost, unitTests, validatePassword
-
-
-
-
Method Detail
-
init
public static final void init()
Init singleton.
-
clearCache
public static final void clearCache()
Clear singleton.
-
getInstance
public static final ScriptedPlatformHooks getInstance()
Get singleton instance.- Returns:
- Singleton instance
-
customStartPage
public void customStartPage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Custom start page.- Overrides:
customStartPage
in classcom.simplicite.util.engine.PlatformHooksInterface
- Parameters:
request
- Requestresponse
- Response
-
customAuthPage
public void customAuthPage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String error) throws java.lang.Exception
This method is called to generate a custom authentication page response.- Overrides:
customAuthPage
in classcom.simplicite.util.engine.PlatformHooksInterface
- Parameters:
request
- HTTP requestresponse
- HTTP responseerror
- Optional error message- Throws:
java.lang.Exception
-
customAuth
public java.lang.String customAuth(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
Custom authentication default implementation:
Try to get login from an authentication header (denoted by theAUTH_HEADER
system parameter)
Then try to get login from an authentication cookie (denoted by theAUTH_COOKIE
system parameter)
Then optionally check authentication origin (denoted by theAUTH_ORIGIN
system parameter)
Note: login processing itself is then supposed to be done in theparseAuth
hook- Overrides:
customAuth
in classcom.simplicite.util.engine.PlatformHooksInterface
- Parameters:
request
- Requestresponse
- Response- Returns:
- Login or null
- Throws:
java.lang.Exception
-
-