java - OAuth2AccessTokenSupport throws OAuth2AccessDeniedException on any RestClientException -


i need send request service using oauth2restservice. need retry sending if run connection problems. retrying i'm using spring retryable annotation.

@retryable(             include = [exception],             exclude = [oauth2accessdeniedexception],             maxattemptsexpression = 5,             backoff = @backoff(delayexpression = 60000)) 

as can see exclude oauth2accessdeniedexception non-retrying requests misconfigured.

but run on issue while: when i'm trying accesstoken , connection issue appears throws oauth2accessdeniedexception too. code oauth2accesstokensupport class listed below:

catch (oauth2exception oe) {                 throw new oauth2accessdeniedexception("access token denied.", resource, oe);             }             catch (restclientexception rce) {                 throw new oauth2accessdeniedexception("error requesting access token.", resource, rce);             } 

so questions are:

1) behavior normal or issue of spring security?

2) if it's not issue provide me how can handle such situations?


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -