[java-identity-provider COMMIT] in /trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn: AbstractValidationAct...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Aug 13 16:54:55 EDT 2013
Author: scantor
Date: Tue Aug 13 16:54:54 2013
New Revision: 4684
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4684&view=rev
Log:
Support for connecting various bits with requested authentication types.
Added:
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/PrincipalSupportingComponent.java (with props)
Modified:
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationFlowDescriptor.java
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationResult.java
Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java?rev=4684&r1=4683&r2=4684&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java Tue Aug 13 16:54:54 2013
@@ -20,6 +20,7 @@
import java.security.Principal;
import java.util.Collection;
import java.util.Collections;
+import java.util.Set;
import javax.annotation.Nonnull;
import javax.security.auth.Subject;
@@ -46,7 +47,8 @@
* A base class for authentication related actions that validate credentials and produce an
* {@link AuthenticationResult}.
*/
-public abstract class AbstractValidationAction extends AbstractAuthenticationAction {
+public abstract class AbstractValidationAction extends AbstractAuthenticationAction
+ implements PrincipalSupportingComponent {
/** Basis for {@link AuthenticationResult}. */
@Nonnull private final Subject authenticatedSubject;
@@ -168,6 +170,11 @@
accountDisabledErrors = Lists.newArrayList(Collections2.filter(messages, Predicates.notNull()));
}
+ /** {@inheritDoc} */
+ @Nonnull @NonnullElements @Unmodifiable public <T extends Principal> Set<T> getSupportedPrincipals(
+ @Nonnull final Class<T> c) {
+ return authenticatedSubject.getPrincipals(c);
+ }
/**
* Set supported non-user-specific principals that the action will include in the subjects
Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationFlowDescriptor.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationFlowDescriptor.java?rev=4684&r1=4683&r2=4684&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationFlowDescriptor.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationFlowDescriptor.java Tue Aug 13 16:54:54 2013
@@ -46,7 +46,7 @@
* directly exposed as properties of the flow, and others can be found by examining the list
* of extended {@link Principal}s that the flow exposes.</p>
*/
-public class AuthenticationFlowDescriptor implements IdentifiableComponent {
+public class AuthenticationFlowDescriptor implements IdentifiableComponent, PrincipalSupportingComponent {
/** The unique identifier of the authentication flow. */
private final String flowId;
@@ -187,14 +187,7 @@
return true;
}
- /**
- * Get an immutable set of supported non-user-specific principals that the flow may produce when it operates.
- *
- * @param <T> type of Principal to inquire on
- * @param c type of Principal to inquire on
- *
- * @return a set of supported principals
- */
+ /** {@inheritDoc} */
@Nonnull @NonnullElements @Unmodifiable public <T extends Principal> Set<T> getSupportedPrincipals(Class<T> c) {
return supportedPrincipals.getPrincipals(c);
}
Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationResult.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationResult.java?rev=4684&r1=4683&r2=4684&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationResult.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationResult.java Tue Aug 13 16:54:54 2013
@@ -19,14 +19,17 @@
import java.security.Principal;
import java.util.Collections;
+import java.util.Set;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.annotation.concurrent.ThreadSafe;
import javax.security.auth.Subject;
+import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
import net.shibboleth.utilities.java.support.annotation.constraint.Positive;
[... 27 lines stripped ...]
More information about the commits
mailing list