class RedisAccessToken implements Serializable {

    private String clientId;

    private String accessToken;

    private String refreshToken;

    private long createTime;

    private Authentication authentication;

    private boolean singleton;

    public boolean storeAuth() {<FILL_FUNCTION_BODY>}

    public AccessToken toAccessToken(int expiresIn) {
        AccessToken token = new AccessToken();
        token.setAccessToken(accessToken);
        token.setRefreshToken(refreshToken);
        token.setExpiresIn(expiresIn);
        return token;
    }
}

        boolean allowAllScope = authentication
                .getAttribute("scope")
                .map("*"::equals)
                .orElse(false);

        //不是单例,并且没有授予全部权限
        return !singleton && !allowAllScope;
    
<no_super_class>