package com.springboot.cloud.gateway.service.impl;

import com.springboot.cloud.auth.client.service.IAuthService;
import com.springboot.cloud.gateway.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PermissionServiceImpl implements PermissionService {

    /**
     * 由authentication-client模块提供签权的feign客户端
     */
    @Autowired
    private IAuthService authService;

    @Override
    public boolean permission(String companyId, String authentication, String url) {
        return authService.hasPermission(companyId,authentication, url);
    }
}
