Rajitha Kumara 4 weeks ago
parent 934de80796
commit 18d8261f4e

@ -29,6 +29,7 @@ public interface IOAuthClientService {
/** /**
* Handle execution of a APIM REST services invocation request. Token and cache handling will be handled by the * Handle execution of a APIM REST services invocation request. Token and cache handling will be handled by the
* service itself. * service itself.
*
* @param request Instance of {@link Request} to execute * @param request Instance of {@link Request} to execute
* @return Instance of {@link OAuthClientResponse} when successful invocation happens * @return Instance of {@link OAuthClientResponse} when successful invocation happens
* @throws OAuthClientException {@link OAuthClientException} * @throws OAuthClientException {@link OAuthClientException}

@ -73,6 +73,7 @@ public class OAuthClient implements IOAuthClientService {
/** /**
* Handle execution of a APIM REST services invocation request. Token and cache handling will be handled by the * Handle execution of a APIM REST services invocation request. Token and cache handling will be handled by the
* service itself. * service itself.
*
* @param request Instance of {@link Request} to execute * @param request Instance of {@link Request} to execute
* @return Instance of {@link OAuthClientResponse} when successful invocation happens * @return Instance of {@link OAuthClientResponse} when successful invocation happens
* @throws OAuthClientException {@link OAuthClientException} * @throws OAuthClientException {@link OAuthClientException}
@ -230,6 +231,7 @@ public class OAuthClient implements IOAuthClientService {
/** /**
* Obtain and refresh idn auth tokens. Note that in the first try it try to obtain new tokens via refresh_token * Obtain and refresh idn auth tokens. Note that in the first try it try to obtain new tokens via refresh_token
* grant type, if it fails it tries to obtain new tokens via password grant type. * grant type, if it fails it tries to obtain new tokens via password grant type.
*
* @param keys Instance of {@link Keys} containing the dcr client's credentials * @param keys Instance of {@link Keys} containing the dcr client's credentials
* @param refreshToken Refresh token * @param refreshToken Refresh token
* @return Instance of {@link Tokens} containing the tokens * @return Instance of {@link Tokens} containing the tokens
@ -264,6 +266,7 @@ public class OAuthClient implements IOAuthClientService {
/** /**
* Intercept the request and add authorization header base on available tokens. * Intercept the request and add authorization header base on available tokens.
*
* @param request Instance of the {@link Request} to intercept * @param request Instance of the {@link Request} to intercept
* @return Intercepted request * @return Intercepted request
* @throws OAuthClientException Throws when error encountered while adding authorization header * @throws OAuthClientException Throws when error encountered while adding authorization header
@ -292,6 +295,7 @@ public class OAuthClient implements IOAuthClientService {
/** /**
* Refresh cached tokens. * Refresh cached tokens.
*
* @throws OAuthClientException Throws when error encountered while refreshing the tokens * @throws OAuthClientException Throws when error encountered while refreshing the tokens
*/ */
private void refresh() throws OAuthClientException { private void refresh() throws OAuthClientException {

Loading…
Cancel
Save