Class DefaultTokenService

java.lang.Object
de.hybris.platform.jalo.user.DefaultTokenService
All Implemented Interfaces:
TokenService

public class DefaultTokenService extends Object implements TokenService
  • Constructor Details

    • DefaultTokenService

      public DefaultTokenService(ModelService modelService, UserDao userDao)
  • Method Details

    • getOrCreateTokenForUser

      public String getOrCreateTokenForUser(String userId)
      Description copied from interface: TokenService
      Method should return the current token assigned to user or create it and return it if the token does not exist
      Specified by:
      getOrCreateTokenForUser in interface TokenService
      Parameters:
      userId - uid
      Returns:
      token assigned to user
    • revokeTokenForUser

      public boolean revokeTokenForUser(String userId)
      Description copied from interface: TokenService
      Method should invalidate the current token for user
      Specified by:
      revokeTokenForUser in interface TokenService
      Parameters:
      userId - uid
      Returns:
      true if operation was successful
    • checkIfTokenIsValid

      public boolean checkIfTokenIsValid(String userId, String tokenToCheck)
      Description copied from interface: TokenService
      Method verifies if passed token for particular user is valid
      Specified by:
      checkIfTokenIsValid in interface TokenService
      Parameters:
      userId - uid
      tokenToCheck - token to be verified
      Returns:
      true if the token submitted for verification matches the one currently assigned to the user