[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 17 17:28:03 EDT 2013
Author: scantor
Date: Wed Jul 17 17:28:03 2013
New Revision: 4592
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4592&view=rev
Log:
Add name hint.
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=4592&r1=4591&r2=4592&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 17 17:28:03 2013
@@ -31,6 +31,7 @@
import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
import net.shibboleth.utilities.java.support.annotation.constraint.Unmodifiable;
import net.shibboleth.utilities.java.support.logic.Constraint;
+import net.shibboleth.utilities.java.support.primitive.StringSupport;
import org.joda.time.DateTime;
import org.opensaml.messaging.context.BaseContext;
@@ -55,6 +56,9 @@
/** Whether authentication must not involve subject interaction. */
private boolean isPassive;
+
+ /** A non-normative hint some protocols support to indicate who the subject might be. */
+ private String hintedName;
/** Authentication workflows associated with a preexisting session and available for (re)use. */
@Nonnull @NonnullElements private ImmutableMap<String, AuthenticationWorkflowDescriptor> activeWorkflows;
@@ -188,6 +192,27 @@
*/
@Nonnull public AuthenticationContext setForceAuthn(boolean force) {
forceAuthn = force;
+ return this;
+ }
+
+ /**
+ * Get a non-normative hint provided by the request about the user's identity.
+ *
+ * @return the username hint
+ */
+ @Nullable public String getHintedName() {
+ return hintedName;
+ }
+
+ /**
+ * Set a non-normative hint provided by the request about the user's identity.
+ *
+ * @param hint the username hint
+ *
+ * @return this authentication request context
+ */
+ @Nonnull public AuthenticationContext setHintedName(@Nullable final String hint) {
+ hintedName = StringSupport.trimOrNull(hint);
return this;
}
More information about the commits
mailing list