[java-identity-provider COMMIT] /trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/delegation/i...
noreply at shibboleth.net
noreply at shibboleth.net
Fri Nov 6 13:29:01 EST 2015
Author: putmanb
Date: Fri Nov 6 13:29:01 2015
New Revision: 7953
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7953&view=rev
Log:
Pull EventException out of delegation action and move to OpenSAML API for general reuse.
Modified:
trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/delegation/impl/DecorateDelegatedAssertion.java
Modified: trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/delegation/impl/DecorateDelegatedAssertion.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/delegation/impl/DecorateDelegatedAssertion.java?rev=7953&r1=7952&r2=7953&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/delegation/impl/DecorateDelegatedAssertion.java (original)
+++ trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/delegation/impl/DecorateDelegatedAssertion.java Fri Nov 6 13:29:01 2015
@@ -48,6 +48,7 @@
import org.opensaml.core.xml.util.XMLObjectSupport;
import org.opensaml.messaging.context.navigate.ChildContextLookup;
import org.opensaml.profile.action.ActionSupport;
+import org.opensaml.profile.action.EventException;
import org.opensaml.profile.action.EventIds;
import org.opensaml.profile.context.ProfileRequestContext;
import org.opensaml.saml.saml2.core.Assertion;
@@ -309,11 +310,11 @@
log.debug("Decorating assertion for use as delegated token");
decorateDelegatedAssertion(profileRequestContext);
} catch (EventException e) {
- if (Objects.equals(EventIds.PROCEED_EVENT_ID, e.getEvent())) {
+ if (Objects.equals(EventIds.PROCEED_EVENT_ID, e.getEventID())) {
log.debug("Decoration of Assertion for delegation terminated with explicit proceed signal");
} else {
log.warn("Decoration of Assertion for delegation terminated with explicit non-proceed signal", e);
- ActionSupport.buildEvent(profileRequestContext, e.getEvent());
+ ActionSupport.buildEvent(profileRequestContext, e.getEventID());
}
}
}
@@ -595,41 +596,4 @@
}
}
}
-
- /**
- * Internal runtime exception class used to terminate processing and communicate
- * a failure event up the call stack to a common location for production of the action event to
- * be returned.
- */
- private static class EventException extends RuntimeException {
-
- /** Serial version UID. */
- private static final long serialVersionUID = -9159689696046606020L;
-
- /** The event ID. */
- private final String eventID;
-
- /**
- * Constructor.
- *
- * @param event the event ID
- * @param message the exception details message
- * @param cause the exception cause
- */
- public EventException(@Nonnull final String event, @Nullable final String message,
- @Nullable final Throwable cause) {
- super(message, cause);
- eventID = Constraint.isNotNull(StringSupport.trimOrNull(event), "Event ID may not be null");
- }
-
- /**
- * Get the event represented by this exception.
- *
- * @return the event ID
- */
- @Nonnull public String getEvent() {
- return eventID;
- }
-
- }
}
More information about the commits
mailing list