12345678910111213141516171819202122232425 |
- package com.yaozhitech.spring5.controller;
- import org.springframework.http.ResponseEntity;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestParam;
- import org.springframework.web.bind.annotation.RestController;
- import com.yaozhitech.spring5.service.ClientAuthService;
- import lombok.AllArgsConstructor;
- @RestController
- @RequestMapping("/clientAuth")
- @AllArgsConstructor
- public class AuthClientController {
-
- private final ClientAuthService authClientService;
- @GetMapping("/verify")
- public ResponseEntity<Boolean> verify(@RequestParam String service, @RequestParam String allowClient, @RequestParam String secret) {
- return ResponseEntity.ok(authClientService.isAllowed(service, allowClient, secret));
- }
- }
|