<filename>src/main/java/com/rozsa/service/authentication/AuthService.java
package com.rozsa.service.authentication;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "auth", url = "${service.url}")
public interface AuthService {
    @RequestMapping(method = RequestMethod.GET, value = "/auth/validate", produces = "application/json")
    AuthResponse validate(@RequestHeader(HttpHeaders.AUTHORIZATION) String token);
}
