Interface AccessAuthenticationHook
- All Known Implementing Classes:
DefaultAccessAuthenticationHook
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddIgnoreAuthCmd(int cmd) Adds main routes that need to be ignored; these ignored main routes can be accessed without login.voidaddIgnoreAuthCmd(int cmd, int subCmd) Adds routes that need to be ignored; these ignored routes can be accessed without login.voidaddRejectionCmd(int cmd) Adds a main route to be rejected; these main routes cannot be accessed directly from the outside.voidaddRejectionCmd(int cmd, int subCmd) Adds a route to be rejected; these routes cannot be accessed directly from the outside.voidclear()Clears all configurations for ignored routes and rejected routes.booleanpass(boolean loginSuccess, int cmdMerge) Access verification.booleanreject(int cmdMerge) Rejection check for the route.voidremoveIgnoreAuthCmd(int cmd) Removes a route that needs to be ignored.voidremoveIgnoreAuthCmd(int cmd, int subCmd) Removes a route that needs to be ignored.voidremoveRejectCmd(int cmd) Removes a route from rejection.voidremoveRejectCmd(int cmd, int subCmd) Removes a route from rejection.voidsetVerifyIdentity(boolean verifyIdentity) Indicates that login is required to access business methods.
-
Method Details
-
setVerifyIdentity
void setVerifyIdentity(boolean verifyIdentity) Indicates that login is required to access business methods.- Parameters:
verifyIdentity- true if login is required to access business methods
-
addIgnoreAuthCmd
void addIgnoreAuthCmd(int cmd, int subCmd) Adds routes that need to be ignored; these ignored routes can be accessed without login.- Parameters:
cmd- cmdsubCmd- subCmd
-
addIgnoreAuthCmd
void addIgnoreAuthCmd(int cmd) Adds main routes that need to be ignored; these ignored main routes can be accessed without login.- Parameters:
cmd- main route
-
removeIgnoreAuthCmd
void removeIgnoreAuthCmd(int cmd, int subCmd) Removes a route that needs to be ignored.- Parameters:
cmd- cmdsubCmd- subCmd
-
removeIgnoreAuthCmd
void removeIgnoreAuthCmd(int cmd) Removes a route that needs to be ignored.- Parameters:
cmd- cmd
-
pass
boolean pass(boolean loginSuccess, int cmdMerge) Access verification.- Parameters:
loginSuccess- true if the user login was successfulUserSession.isVerifyIdentity()cmdMerge- route- Returns:
- true if access verification passed
-
addRejectionCmd
void addRejectionCmd(int cmd) Adds a main route to be rejected; these main routes cannot be accessed directly from the outside.- Parameters:
cmd- main route
-
addRejectionCmd
void addRejectionCmd(int cmd, int subCmd) Adds a route to be rejected; these routes cannot be accessed directly from the outside.- Parameters:
cmd- main routesubCmd- sub route
-
removeRejectCmd
void removeRejectCmd(int cmd, int subCmd) Removes a route from rejection.- Parameters:
cmd- main routesubCmd- sub route
-
removeRejectCmd
void removeRejectCmd(int cmd) Removes a route from rejection.- Parameters:
cmd- main route
-
reject
boolean reject(int cmdMerge) Rejection check for the route.- Parameters:
cmdMerge- route- Returns:
- true if the user is forbidden from accessing this route
-
clear
void clear()Clears all configurations for ignored routes and rejected routes.
-