manage MissingTokenException

This commit is contained in:
Alfredo Oliviero 2024-09-20 14:53:29 +02:00
parent 3bb2c5c225
commit 18590215c3
1 changed files with 3 additions and 1 deletions

View File

@ -18,10 +18,12 @@ import org.gcube.common.storagehub.model.items.Item;
import org.gcube.oidc.rest.JWTToken;
import org.gcube.portal.oidc.lr62.InvalidTokenException;
import org.gcube.portal.oidc.lr62.JWTTokenUtil;
import org.gcube.portal.oidc.lr62.MissingRefreshTokenException;
import org.gcube.portal.oidc.lr62.MissingTokenException;
import org.gcube.portal.oidc.lr62.NotAuthorizedException;
import org.gcube.portal.oidc.lr62.OIDCUmaUtil;
import org.gcube.portal.oidc.lr62.RefreshException;
import org.gcube.portal.oidc.lr62.RefreshTokenExpiredException;
import org.gcube.portal.oidc.lr62.UMAException;
import org.gcube.portlets.user.wswidget.shared.AuthorizedUser;
import org.gcube.portlets.user.wswidget.shared.WSItem;
@ -176,7 +178,7 @@ public class StorageHubServiceUtil {
JWTToken umaToken = OIDCUmaUtil.getUMAToken(request, username, currentContext);
AccessTokenProvider.instance.set(JWTTokenUtil.getAccessTokenString(umaToken));
} catch (InvalidTokenException | MissingTokenException | RefreshException | NotAuthorizedException
| UMAException e1) {
| UMAException | MissingRefreshTokenException | RefreshTokenExpiredException e1) {
_log.warn("could not get UMA Token for context="+currentContext);
e1.printStackTrace();
}