public OauthData refreshOauthData ( String refreshToken ) throws HelloSignException { OauthData data = new OauthData ( httpClient . withAuth ( auth ) . withPostField ( OAUTH_GRANT_TYPE , OAUTH_GRANT_TYPE_REFRESH_TOKEN ) . withPostField ( OAUTH_REFRESH_TOKEN , refreshToken ) . post ( OAUTH_TOKEN_URL ) . asJson ( ) ) ; if ( data != null ) { setAccessToken ( data . getAccessToken ( ) , data . getTokenType ( ) ) ; } return data ; }
Refreshes the OauthData for this client with the provided refresh token .