controllers docs checkpoint
This commit is contained in:
@ -26,6 +26,10 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
|
||||
/**
|
||||
* Rest controller to Token related endpoints. More detailed api docs is
|
||||
* available via swagger
|
||||
*/
|
||||
@RestController
|
||||
@CrossOrigin
|
||||
@Api(tags = { "Token" }, value = "Token", description = "Enpoints to get authorization.")
|
||||
@ -40,6 +44,10 @@ public class TokenController {
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
/**
|
||||
* @param ticket via CAS obtained ticket - it's base to auth user
|
||||
* @return TokenResponse if operation was success
|
||||
*/
|
||||
@GetMapping("/token")
|
||||
@ApiOperation(value = "Endpoint to access token required to call secured endpoints. In order to access token we need to provide access token comming from unviersity CAS system")
|
||||
public ResponseEntity<TokenResponse> getToken(
|
||||
@ -64,6 +72,11 @@ public class TokenController {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param refreshToken refresh token obtained via /token endpoint
|
||||
* @return TokenResponse if operation was success
|
||||
* @throws NullPointerException is thrown if user was not found by refrshtoken
|
||||
*/
|
||||
@GetMapping("/token/refresh")
|
||||
@ApiOperation(value = "Endpoint to access new token based on refresh token. It's needed when request with provided token fail with code 403")
|
||||
public ResponseEntity<TokenResponse> getRefreshToken(
|
||||
|
Reference in New Issue
Block a user