[java-identity-provider COMMIT] /trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/AuthenticationCon...
noreply at shibboleth.net
noreply at shibboleth.net
Wed Jul 31 13:08:50 EDT 2013
Author: scantor
Date: Wed Jul 31 13:08:50 2013
New Revision: 4642
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4642&view=rev
Log:
Add a context slot for preserving login errors.
Modified:
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/AuthenticationContext.java
Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/AuthenticationContext.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/AuthenticationContext.java?rev=4642&r1=4641&r2=4642&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/AuthenticationContext.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/AuthenticationContext.java Wed Jul 31 13:08:50 2013
@@ -75,6 +75,9 @@
/** Authentication flow being attempted to authenticate the user. */
@Nullable private AuthenticationFlowDescriptor attemptedFlow;
+ /** An exception caught by a flow during the login process. */
+ @Nullable private Exception loginException;
+
/** A successfully processed authentication result (the output of the attempted flow, if any). */
@Nullable private AuthenticationResult authenticationResult;
@@ -272,6 +275,29 @@
return this;
}
+ /**
+ * Get the latest login exception encountered during the processing of the attemped flow.
+ *
+ * @return a login exception encountered during flow processing
+ */
+ @Nullable public Exception getLoginException() {
+ return loginException;
+ }
+
+ /**
+ * Set a login exception encountered during the processing of the attempted flow.
+ *
+ * <p>This preserves error state generated by an action for use by the flow, typically in
+ * response to user input that can be recovered from, such as invalid credentials,
+ * a locked account, etc. Essentially anything that requires a repetition of user
+ * interaction and may require reporting on the error.</p>
+ *
+ * @param e the exception to preserve
+ */
+ public void setLoginException(@Nullable final Exception e) {
+ loginException = e;
+ }
+
/**
* Get the authentication result produced by the attempted flow, or reused for SSO.
*
More information about the commits
mailing list