package com.ruoyi.web.modules.openstats.support;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.ruoyi.common.utils.StringUtils;

/**
 * Open API Token 校验
 */
@Component
public class OpenStatsTokenSupport
{
    @Autowired
    private OpenStatsTokenCryptoSupport tokenCryptoSupport;

    public boolean isValidToken(String accessToken)
    {
        if (StringUtils.isEmpty(accessToken))
        {
            return false;
        }
        return tokenCryptoSupport.validateEncryptedToken(accessToken.trim());
    }
}
