Package org.opensaml.saml.saml2.binding.security.impl

# Class SAML2AuthnRequestsSignedSecurityHandler

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.messaging.handler.AbstractMessageHandler
org.opensaml.saml.saml2.binding.security.impl.SAML2AuthnRequestsSignedSecurityHandler

All Implemented Interfaces:
  `Component`, `DestructableComponent`, `InitializableComponent`, `MessageHandler`

public class SAML2AuthnRequestsSignedSecurityHandler extends AbstractMessageHandler
Message handler implementation that enforces the AuthnRequestsSigned flag of SAML 2 metadata element @{link `SPSSODescriptor`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Logger.

## Constructor Summary

Constructors
Constructor
Description
`SAML2AuthnRequestsSignedSecurityHandler()`

## Method Summary

Modifier and Type
Method
Description
`void`
`doInvoke(MessageContext messageContext)`
Performs the handler logic.
`protected boolean`
`isMessageSigned(MessageContext messageContext)`
Determine whether the inbound message is signed.
`protected boolean`
`isRequestSigningRequired(MessageContext messageContext)`
Determine whether a signature is required.

### Methods inherited from class org.opensaml.messaging.handler.AbstractMessageHandler

`doPostInvoke, doPostInvoke, doPreInvoke, getActivationCondition, getLogPrefix, invoke, isPreInvokeCalled, setActivationCondition`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface net.shibboleth.shared.component.InitializableComponent

`initialize, isInitialized`

## Field Details

### log

@Nonnull private final org.slf4j.Logger log
Logger.

## Constructor Details

### SAML2AuthnRequestsSignedSecurityHandler

public SAML2AuthnRequestsSignedSecurityHandler()

## Method Details

### doInvoke

public void doInvoke(@Nonnull MessageContext messageContext) throws MessageHandlerException
Performs the handler logic.

Specified by:
  `doInvoke` in class `AbstractMessageHandler`
Parameters:
  `messageContext` - the message context on which to invoke the handler
Throws:
  `MessageHandlerException` - if there is an error invoking the handler on the message context

### isMessageSigned

protected boolean isMessageSigned(@Nonnull MessageContext messageContext)
Determine whether the inbound message is signed.

Parameters:
  `messageContext` - the message context being evaluated
Returns:
  true if the inbound message is signed, otherwise false

### isRequestSigningRequired

protected boolean isRequestSigningRequired(@Nonnull MessageContext messageContext)
Determine whether a signature is required.

Parameters:
  `messageContext` - message context
Returns:
  true iff the request must be signed
Since:
  4.3.0