made optional parameters optional
parent
a9da88fb79
commit
93a0492e97
|
@ -61,8 +61,10 @@ public class IntrospectionEndpoint {
|
||||||
|
|
||||||
@PreAuthorize("hasRole('ROLE_CLIENT')")
|
@PreAuthorize("hasRole('ROLE_CLIENT')")
|
||||||
@RequestMapping("/introspect")
|
@RequestMapping("/introspect")
|
||||||
public String verify(@RequestParam("token") String tokenValue, @RequestParam("resource_id") String resourceId, @RequestParam("token_type_hint") String tokenType,
|
public String verify(@RequestParam("token") String tokenValue,
|
||||||
Principal p, Model model) {
|
@RequestParam(value = "resource_id", required = false) String resourceId,
|
||||||
|
@RequestParam(value = "token_type_hint", required = false) String tokenType,
|
||||||
|
Principal p, Model model) {
|
||||||
|
|
||||||
if (Strings.isNullOrEmpty(tokenValue)) {
|
if (Strings.isNullOrEmpty(tokenValue)) {
|
||||||
logger.error("Verify failed; token value is null");
|
logger.error("Verify failed; token value is null");
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class RevocationEndpoint {
|
||||||
|
|
||||||
@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_CLIENT')")
|
@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_CLIENT')")
|
||||||
@RequestMapping("/revoke")
|
@RequestMapping("/revoke")
|
||||||
public String revoke(@RequestParam("token") String tokenValue, @RequestParam("token_type_hint") String tokenType, Principal principal, Model model) {
|
public String revoke(@RequestParam("token") String tokenValue, @RequestParam(value = "token_type_hint", required = false) String tokenType, Principal principal, Model model) {
|
||||||
|
|
||||||
// This is the token as passed in from OAuth (in case we need it some day)
|
// This is the token as passed in from OAuth (in case we need it some day)
|
||||||
//OAuth2AccessTokenEntity tok = tokenServices.getAccessToken((OAuth2Authentication) principal);
|
//OAuth2AccessTokenEntity tok = tokenServices.getAccessToken((OAuth2Authentication) principal);
|
||||||
|
|
Loading…
Reference in New Issue