return request.getMethod().equals(HttpMethod.POST.toString()) && StringUtils.isNotBlank(oauthApproval);
}
private void processInitial(HttpServletRequest request, ServletResponse response, FilterChain chain,
String returnUri, String authStateValue, Client client) throws IOException, ServletException {
AuthenticatedPrincipal principal = (AuthenticatedPrincipal) request.getAttribute(AbstractAuthenticator.PRINCIPAL);
List<AccessToken> tokens = accessTokenRepository.findByResourceOwnerIdAndClient(principal.getName(), client);
if (!CollectionUtils.isEmpty(tokens)) {
// If another token is already present for this resource owner and client, no new consent should be requested
List<String> grantedScopes = tokens.get(0).getScopes(); // take the scopes of the first access token found.
setGrantedScopes(request, grantedScopes.toArray(new String[grantedScopes.size()]));
chain.doFilter(request, response);