|
@@ -48,10 +48,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+
|
|
|
/**
|
|
|
* @author Crystal.Sea
|
|
|
* https://apereo.github.io/cas/6.2.x/protocol/REST-Protocol.html
|
|
|
*/
|
|
|
+@Api(tags = "CAS REST API文档模块")
|
|
|
@Controller
|
|
|
public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{
|
|
|
final static Logger _logger = LoggerFactory.getLogger(CasRestV1Endpoint.class);
|
|
@@ -60,7 +64,7 @@ public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{
|
|
|
@Qualifier("authenticationProvider")
|
|
|
AbstractAuthenticationProvider authenticationProvider ;
|
|
|
|
|
|
-
|
|
|
+ @ApiOperation(value = "CAS REST认证接口", notes = "通过用户名密码获取TGT",httpMethod="POST")
|
|
|
@RequestMapping(value="/authz/cas/v1/tickets",
|
|
|
method=RequestMethod.POST,
|
|
|
consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
|
@@ -97,6 +101,7 @@ public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "CAS REST认证接口", notes = "通过TGT获取ST",httpMethod="POST")
|
|
|
@RequestMapping(value="/authz/cas/v1/tickets/{ticketGrantingTicket}",
|
|
|
method=RequestMethod.POST,
|
|
|
consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
|
@@ -124,7 +129,7 @@ public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{
|
|
|
}
|
|
|
return new ResponseEntity<>("", HttpStatus.BAD_REQUEST);
|
|
|
}
|
|
|
-
|
|
|
+ @ApiOperation(value = "CAS REST认证接口", notes = "检查TGT状态",httpMethod="GET")
|
|
|
@RequestMapping(value="/authz/cas/v1/tickets/{ticketGrantingTicket}",
|
|
|
method=RequestMethod.GET)
|
|
|
public ResponseEntity<String> verifyTicketGrantingTicketStatus(
|
|
@@ -144,6 +149,7 @@ public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{
|
|
|
return new ResponseEntity<>("", HttpStatus.NOT_FOUND);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "CAS REST认证接口", notes = "注销TGT状态",httpMethod="DELETE")
|
|
|
@RequestMapping(value="/authz/cas/v1/tickets/{ticketGrantingTicket}",
|
|
|
method=RequestMethod.DELETE)
|
|
|
public ResponseEntity<String> destroyTicketGrantingTicket(
|
|
@@ -163,7 +169,7 @@ public class CasRestV1Endpoint extends CasBaseAuthorizeEndpoint{
|
|
|
return new ResponseEntity<>("", HttpStatus.NOT_FOUND);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ @ApiOperation(value = "CAS REST认证接口", notes = "用户名密码登录接口",httpMethod="POST")
|
|
|
@RequestMapping(value="/authz/cas/v1/users",
|
|
|
method=RequestMethod.POST,
|
|
|
consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|