Class BrowserToken


  • public final class BrowserToken
    extends Object
    class to manage browser token for auto authentication
    Author:
    hengsin
    • Method Detail

      • save

        public static void save​(MSession session,
                                MUser user)
        save session and user as client side token for future auto login
        Parameters:
        session -
        user -
      • remove

        public static void remove()
        remove client side token for auto login
      • load

        public static void load​(org.zkoss.zk.ui.Component component)
        load stored client side token for auto login
        Parameters:
        component -
      • validateToken

        public static boolean validateToken​(MSession session,
                                            MUser user,
                                            String token)
        validate a stored client side token is valid
        Parameters:
        session -
        user -
        token -
        Returns:
        true if token is valid