@WebListener public class SPFormAuthenticationMechanism extends ServletFormAuthenticationMechanism
ServletFormAuthenticationMechanism.Factory
AuthenticationMechanism.AuthenticationMechanismOutcome, AuthenticationMechanism.ChallengeResult
SAVE_ORIGINAL_REQUEST
DEFAULT_POST_LOCATION, LOCATION_ATTRIBUTE
Constructor and Description |
---|
SPFormAuthenticationMechanism(FormParserFactory parserFactory,
String name,
String loginPage,
String errorPage,
ServletContext servletContext,
PicketLinkType configuration,
PicketLinkAuditHelper auditHelper) |
SPFormAuthenticationMechanism(FormParserFactory parserFactory,
String name,
String loginPage,
String errorPage,
ServletContext servletContext,
SAMLConfigurationProvider configProvider,
PicketLinkAuditHelper auditHelper) |
handleRedirectBack, servePage, storeInitialLocation
runFormAuth
public static final String INITIAL_LOCATION_STORED
protected transient String samlHandlerChainClass
protected final ServletContext servletContext
protected SAMLConfigurationProvider configProvider
SAMLConfigurationProvider
protected transient X509Certificate idpCertificate
protected int timerInterval
protected Timer timer
public static final String EMPTY_PASSWORD
protected boolean enableAudit
public static final String FORM_ACCOUNT_NOTE
public static final String FORM_REQUEST_NOTE
protected transient SAML2HandlerChain chain
protected SPType spConfiguration
protected PicketLinkType configuration
protected String serviceURL
protected String identityURL
protected String issuerID
protected String configFile
protected boolean saveRestoreRequest
protected Lock chainLock
protected String canonicalizationMethod
protected PicketLinkAuditHelper auditHelper
protected TrustKeyManager keyManager
public SPFormAuthenticationMechanism(FormParserFactory parserFactory, String name, String loginPage, String errorPage, ServletContext servletContext, PicketLinkType configuration, PicketLinkAuditHelper auditHelper)
public SPFormAuthenticationMechanism(FormParserFactory parserFactory, String name, String loginPage, String errorPage, ServletContext servletContext, SAMLConfigurationProvider configProvider, PicketLinkAuditHelper auditHelper) throws ProcessingException
ProcessingException
public AuthenticationMechanism.ChallengeResult sendChallenge(HttpServerExchange exchange, SecurityContext securityContext)
AuthenticationMechanism
The individual mechanisms should update the response headers and body of the message as appropriate however they should
not set the response code, instead that should be indicated in the AuthenticationMechanism.ChallengeResult
and the most appropriate
overall response code will be selected.
sendChallenge
in interface AuthenticationMechanism
sendChallenge
in class FormAuthenticationMechanism
exchange
- The exchangesecurityContext
- The security contextAuthenticationMechanism.ChallengeResult
indicating if a challenge was sent and the desired response code.public AuthenticationMechanism.AuthenticationMechanismOutcome authenticate(HttpServerExchange exchange, SecurityContext securityContext)
AuthenticationMechanism
authenticate
in interface AuthenticationMechanism
authenticate
in class FormAuthenticationMechanism
exchange
- The exchangeprotected boolean matchRequest(HttpServletRequest request)
protected void register(SecurityContext securityContext, Account account)
protected AuthenticationMechanism.AuthenticationMechanismOutcome localAuthentication(HttpServerExchange httpServerExchange, SecurityContext securityContext) throws IOException
httpServerExchange
- securityContext
- IOException
protected boolean isHttpPostBinding()
Indicates if the SP is configure with HTTP POST Binding.
protected boolean sessionIsValid(HttpSession session)
protected String savedRequestURL(HttpSession session)
protected void startPicketLink()
protected void initKeyProvider(ServletContext context)
Initialize the KeyProvider configurations. This configurations are to be used during signing and validation of SAML assertions.
context
- protected boolean doSupportSignature()
Indicates if digital signatures/validation of SAML assertions are enabled. Subclasses that supports signature should override this method.
protected void processConfiguration()
protected IDPSSODescriptorType getIdpMetadataFromFile(SPType configuration)
protected IDPSSODescriptorType handleMetadata(EntitiesDescriptorType entities)
protected IDPSSODescriptorType getIDPSSODescriptor(EntitiesDescriptorType entities)
protected IDPSSODescriptorType handleMetadata(EntityDescriptorType entityDescriptor)
protected void initializeHandlerChain() throws ConfigurationException, ProcessingException
protected void populateChainConfig() throws ConfigurationException, ProcessingException
public AuthenticationMechanism.AuthenticationMechanismOutcome handleSAML11UnsolicitedResponse(HttpServletRequest request, HttpServletResponse response, SecurityContext securityContext)
public void audit(PicketLinkAuditEvent event)
public String getIdentityURL()
Copyright © 2016 JBoss by Red Hat. All rights reserved.