1535e842decc04e663141de12fca535ec47b25e9
[institute/sw-backend.git] /
1 package com.supwisdom.institute.backend.admin.bff.apis.remote.base.v1.authn;
2
3 import org.springframework.cloud.openfeign.FeignClient;
4 import org.springframework.web.bind.annotation.PathVariable;
5 import org.springframework.web.bind.annotation.RequestMapping;
6 import org.springframework.web.bind.annotation.RequestMethod;
7 import org.springframework.web.bind.annotation.RequestParam;
8
9 import com.alibaba.fastjson.JSONObject;
10 import com.supwisdom.institute.backend.admin.bff.apis.remote.base.configuration.BaseFeignClientConfiguration;
11
12 @FeignClient(
13     configuration = {BaseFeignClientConfiguration.class},
14     name = "base-admin-account-remote-feign-client",
15     url = "${sw-backend-base-api.uri}/v1/authn",
16     fallbackFactory = AuthnAccountRemoteFallbackFactory.class
17 )
18 public interface AuthnAccountRemoteFeignClient {
19   
20   @RequestMapping(method = RequestMethod.GET, path = "/{username}/account")
21   JSONObject account(
22       @PathVariable(name = "username") String username);
23
24   @RequestMapping(method = RequestMethod.GET, path = "/{username}/roles")
25   JSONObject roles(
26       @PathVariable(name = "username") String username);
27
28   @RequestMapping(method = RequestMethod.GET, path = "/{username}/applications")
29   JSONObject applications(
30       @PathVariable(name = "username") String username,
31       @RequestParam(name = "applicationId", required = false) String applicationId);
32
33   @RequestMapping(method = RequestMethod.GET, path = "/{username}/menus")
34   JSONObject menus(
35       @PathVariable(name = "username") String username,
36       @RequestParam(name = "applicationId", required = false) String applicationId);
37
38   @RequestMapping(method = RequestMethod.GET, path = "/{username}/operations")
39   JSONObject operations(
40       @PathVariable(name = "username") String username,
41       @RequestParam(name = "applicationId", required = false) String applicationId);
42
43
44   @RequestMapping(method = RequestMethod.GET, path = "/{username}/resources")
45   JSONObject resources(
46       @PathVariable(name = "username") String username,
47       @RequestParam(name = "applicationId", required = false) String applicationId);
48
49 }