fixed execution order of introspection endpoint
parent
c3bf359629
commit
76b7324d88
|
@ -87,13 +87,6 @@ public class IntrospectionEndpoint {
|
||||||
@RequestParam(value = "token_type_hint", required = false) String tokenType,
|
@RequestParam(value = "token_type_hint", required = false) String tokenType,
|
||||||
Authentication auth, Model model) {
|
Authentication auth, Model model) {
|
||||||
|
|
||||||
if (Strings.isNullOrEmpty(tokenValue)) {
|
|
||||||
logger.error("Verify failed; token value is null");
|
|
||||||
Map<String,Boolean> entity = ImmutableMap.of("active", Boolean.FALSE);
|
|
||||||
model.addAttribute("entity", entity);
|
|
||||||
return JsonEntityView.VIEWNAME;
|
|
||||||
}
|
|
||||||
|
|
||||||
ClientDetailsEntity authClient = null;
|
ClientDetailsEntity authClient = null;
|
||||||
Set<String> authScopes = new HashSet<>();
|
Set<String> authScopes = new HashSet<>();
|
||||||
|
|
||||||
|
@ -142,8 +135,16 @@ public class IntrospectionEndpoint {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// now we need to look up the token in our token stores
|
// by here we're allowed to introspect, now we need to look up the token in our token stores
|
||||||
|
|
||||||
|
// first make sure the token is there
|
||||||
|
if (Strings.isNullOrEmpty(tokenValue)) {
|
||||||
|
logger.error("Verify failed; token value is null");
|
||||||
|
Map<String,Boolean> entity = ImmutableMap.of("active", Boolean.FALSE);
|
||||||
|
model.addAttribute("entity", entity);
|
||||||
|
return JsonEntityView.VIEWNAME;
|
||||||
|
}
|
||||||
|
|
||||||
OAuth2AccessTokenEntity accessToken = null;
|
OAuth2AccessTokenEntity accessToken = null;
|
||||||
OAuth2RefreshTokenEntity refreshToken = null;
|
OAuth2RefreshTokenEntity refreshToken = null;
|
||||||
ClientDetailsEntity tokenClient;
|
ClientDetailsEntity tokenClient;
|
||||||
|
|
Loading…
Reference in New Issue