Interface AccessAuthenticationHook

All Known Implementing Classes:
DefaultAccessAuthenticationHook

public interface AccessAuthenticationHook
Author:
渔民小镇
date:
2023-02-19
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds main routes that need to be ignored; these ignored main routes can be accessed without login.
    void
    addIgnoreAuthCmd(int cmd, int subCmd)
    Adds routes that need to be ignored; these ignored routes can be accessed without login.
    void
    addRejectionCmd(int cmd)
    Adds a main route to be rejected; these main routes cannot be accessed directly from the outside.
    void
    addRejectionCmd(int cmd, int subCmd)
    Adds a route to be rejected; these routes cannot be accessed directly from the outside.
    void
    Clears all configurations for ignored routes and rejected routes.
    boolean
    pass(boolean loginSuccess, int cmdMerge)
    Access verification.
    boolean
    reject(int cmdMerge)
    Rejection check for the route.
    void
    Removes a route that needs to be ignored.
    void
    removeIgnoreAuthCmd(int cmd, int subCmd)
    Removes a route that needs to be ignored.
    void
    removeRejectCmd(int cmd)
    Removes a route from rejection.
    void
    removeRejectCmd(int cmd, int subCmd)
    Removes a route from rejection.
    void
    setVerifyIdentity(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 - cmd
      subCmd - 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 - cmd
      subCmd - 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 successful UserSession.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 route
      subCmd - sub route
    • removeRejectCmd

      void removeRejectCmd(int cmd, int subCmd)
      Removes a route from rejection.
      Parameters:
      cmd - main route
      subCmd - 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.