public class ValidateX509Certificate extends AbstractValidationAction
CertificateContext containing X509Certificate objects, and
directly produces an AuthenticationResult based on that identity, after
optionally validating the certificate(s) against a TrustEngine.EventIds.PROCEED_EVENT_ID, EventIds.INVALID_PROFILE_CTX, AuthnEventIds.INVALID_CREDENTIALS, AuthnEventIds.NO_CREDENTIALSProfileRequestContext.getSubcontext(AuthenticationContext.class).getAttemptedFlow() != null
AuthenticationResult is saved to the AuthenticationContext on a
successful validation. On a failure, the
AbstractValidationAction.handleError(ProfileRequestContext, AuthenticationContext, Exception, String)
method is called.| Modifier and Type | Field and Description |
|---|---|
private CertificateContext |
certContext
CertificateContext containing the credentials to validate.
|
private static String |
DEFAULT_METRIC_NAME
Default prefix for metrics.
|
private org.slf4j.Logger |
log
Class logger.
|
private TrustEngine<? super X509Credential> |
trustEngine
Optional trust engine to validate certificates against.
|
| Constructor and Description |
|---|
ValidateX509Certificate()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doExecute(ProfileRequestContext profileRequestContext,
AuthenticationContext authenticationContext) |
protected boolean |
doPreExecute(ProfileRequestContext profileRequestContext,
AuthenticationContext authenticationContext) |
protected Subject |
populateSubject(Subject subject) |
void |
setTrustEngine(TrustEngine<? super X509Credential> tm)
Set a
TrustEngine to use. |
addDefaultPrincipals, buildAuthenticationResult, getClassifiedErrors, getMetricName, getResultCachingPredicate, getSubject, getSupportedPrincipals, handleError, handleError, handleWarning, recordFailure, recordSuccess, setAddDefaultPrincipals, setClassifiedMessages, setMetricName, setRequesterLookupStrategy, setResponderLookupStrategy, setResultCachingPredicate, setSupportedPrincipalsdoExecute, doPreExecute, setLookupStrategydoExecute, execute, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategygetActivationCondition, setActivationConditiondoPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponsedestroy, doDestroy, doInitialize, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitialize, isInitialized@Nonnull @NotEmpty private static final String DEFAULT_METRIC_NAME
@Nonnull private final org.slf4j.Logger log
@Nullable private TrustEngine<? super X509Credential> trustEngine
@Nullable private CertificateContext certContext
public void setTrustEngine(@Nullable TrustEngine<? super X509Credential> tm)
TrustEngine to use.tm - trust engine to useprotected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext)
doPreExecute in class AbstractValidationActionprotected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext)
doExecute in class AbstractAuthenticationAction@Nonnull protected Subject populateSubject(@Nonnull Subject subject)
populateSubject in class AbstractValidationActionCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.