From 729500a159c61a697c528e0c86abd132f4380b0d Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 12 Jul 2018 16:10:53 +0200 Subject: some more updates --- .../impl/idp/controller/protocols/RequestImpl.java | 70 +++++++++++++++++----- 1 file changed, 54 insertions(+), 16 deletions(-) (limited to 'eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java') diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java index 6a7f4440..a453a8a3 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java @@ -1,3 +1,27 @@ +/******************************************************************************* + * Copyright 2017 Graz University of Technology + * EAAF-Core Components has been developed in a cooperation between EGIZ, + * A-SIT+, A-SIT, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * https://joinup.ec.europa.eu/news/understanding-eupl-v12 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ +/******************************************************************************* + *******************************************************************************/ /******************************************************************************* *******************************************************************************/ package at.gv.egiz.eaaf.core.impl.idp.controller.protocols; @@ -41,7 +65,7 @@ public abstract class RequestImpl implements IRequest, Serializable{ private String pendingRequestId; private String processInstanceId; - private String ssoSessionId; + private String internalSSOSessionId; private String uniqueTransactionIdentifer; private String uniqueSessionIdentifer; @@ -94,15 +118,13 @@ public abstract class RequestImpl implements IRequest, Serializable{ } catch (MalformedURLException e) { log.error("IDP AuthenticationServiceURL Prefix is not a valid URL." + authURLString, e); - throw new EAAFAuthenticationException("errorId", new Object[]{authURLString}, - "IDP AuthenticationServiceURL Prefix is not a valid URL.", e); + throw new EAAFAuthenticationException("errorId", new Object[]{authURLString}, e); } this.idpAuthURL = authConfig.validateIDPURL(authReqURL); if (this.idpAuthURL == null) { log.warn("Extract AuthenticationServiceURL: " + authReqURL + " is NOT found in configuration."); - throw new EAAFAuthenticationException("errorId", new Object[]{authURLString}, - "Extract AuthenticationServiceURL: " + authReqURL + " is NOT found in configuration."); + throw new EAAFAuthenticationException("errorId", new Object[]{authURLString}); } @@ -128,25 +150,21 @@ public abstract class RequestImpl implements IRequest, Serializable{ } -// /** -// * This method map the protocol specific requested attributes to PVP 2.1 attributes. -// * -// * @return List of PVP 2.1 attribute names with maps all protocol specific attributes -// */ -// public abstract Collection getRequestedAttributes(MetadataProvider metadataProvider); - public final void setSPEntityId(String spIdentifier) { this.requestedServiceProviderIdentifer = spIdentifier; } + @Override public final String getSPEntityId() { return this.requestedServiceProviderIdentifer; } + @Override public final boolean isPassiv() { return passiv; } + @Override public final boolean forceAuth() { return force; } @@ -159,6 +177,7 @@ public abstract class RequestImpl implements IRequest, Serializable{ this.force = force; } + @Override public final String requestedAction() { return action; } @@ -167,6 +186,7 @@ public abstract class RequestImpl implements IRequest, Serializable{ this.action = action; } + @Override public final String requestedModule() { return module; } @@ -180,30 +200,36 @@ public abstract class RequestImpl implements IRequest, Serializable{ } + @Override public final String getPendingRequestId() { return pendingRequestId; } - public final String getSSOSessionIdentifier() { - return this.ssoSessionId; + @Override + public final String getInternalSSOSessionIdentifier() { + return this.internalSSOSessionId; } - public final void setSSOSessionIdentifier(String internalSSOSessionId) { - this.ssoSessionId = internalSSOSessionId; + @Override + public final void setInternalSSOSessionIdentifier(String internalSSOSessionId) { + this.internalSSOSessionId = internalSSOSessionId; } + @Override public final Map genericFullDataStorage() { return this.genericDataStorage; } + @Override public final ISPConfiguration getServiceProviderConfiguration() { return this.spConfiguration; } + @Override public T getServiceProviderConfiguration(final Class decorator) { if (this.spConfiguration != null) { if (decorator.isAssignableFrom(this.spConfiguration.getClass())) { @@ -224,16 +250,19 @@ public abstract class RequestImpl implements IRequest, Serializable{ } + @Override public final String getUniqueTransactionIdentifier() { return this.uniqueTransactionIdentifer; } + @Override public final String getUniqueSessionIdentifier() { return this.uniqueSessionIdentifer; } + @Override public final String getProcessInstanceId() { return this.processInstanceId; @@ -254,10 +283,12 @@ public abstract class RequestImpl implements IRequest, Serializable{ } + @Override public final String getAuthURL() { return this.idpAuthURL; } + @Override public final String getAuthURLWithOutSlash() { if (this.idpAuthURL.endsWith("/")) return this.idpAuthURL.substring(0, this.idpAuthURL.length()-1); @@ -266,6 +297,7 @@ public abstract class RequestImpl implements IRequest, Serializable{ } + @Override public final boolean isNeedAuthentication() { return needAuthentication; } @@ -274,6 +306,7 @@ public abstract class RequestImpl implements IRequest, Serializable{ this.needAuthentication = needAuthentication; } + @Override public final boolean isAuthenticated() { return isAuthenticated; } @@ -282,6 +315,7 @@ public abstract class RequestImpl implements IRequest, Serializable{ this.isAuthenticated = isAuthenticated; } + @Override public final boolean needSingleSignOnFunctionality() { return needSSO; } @@ -290,6 +324,7 @@ public abstract class RequestImpl implements IRequest, Serializable{ } + @Override public final boolean isNeedUserConsent() { return this.needUserConsent; @@ -300,6 +335,7 @@ public abstract class RequestImpl implements IRequest, Serializable{ } + @Override public final boolean isAbortedByUser() { return this.isAbortedByUser; } @@ -309,6 +345,7 @@ public abstract class RequestImpl implements IRequest, Serializable{ } + @Override public final Object getGenericData(String key) { if (StringUtils.isNotEmpty(key)) { return genericDataStorage.get(key); @@ -319,6 +356,7 @@ public abstract class RequestImpl implements IRequest, Serializable{ return null; } + @Override public final T getGenericData(String key, final Class clazz) { if (StringUtils.isNotEmpty(key)) { Object data = genericDataStorage.get(key); -- cgit v1.2.3