Class SAMLSOAPClientContextBuilder<InboundMessageType extends SAMLObject,OutboundMessageType extends SAMLObject>
- java.lang.Object
-
- org.opensaml.saml.common.messaging.soap.SAMLSOAPClientContextBuilder<InboundMessageType,OutboundMessageType>
-
- Type Parameters:
InboundMessageType
- the inbound message typeOutboundMessageType
- the outbound message type
public class SAMLSOAPClientContextBuilder<InboundMessageType extends SAMLObject,OutboundMessageType extends SAMLObject> extends Object
BuilderInOutOperationContext
instances for SAML SOAP client use cases.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SAMLSOAPClientContextBuilder.DefaultTLSCriteriaSetStrategy
Default TLS CriteriaSet strategy function.
-
Field Summary
Fields Modifier and Type Field Description private OutboundMessageType
outboundMessage
The outbound message.private EntityDescriptor
peerEntityDescriptor
The SAML peer EntityDescriptor.private String
peerEntityID
The SAML peer entityID.private QName
peerEntityRole
The SAML peer entity role.private RoleDescriptor
peerRoleDescriptor
The SAML peer RoleDescriptor.private String
pipelineName
SOAP client message pipeline name.private String
protocol
The SAML protocol in use.private String
securityConfigurationProfileId
SOAP client security configuration profile ID.private String
selfEntityID
The SAML self entityID.private Function<org.opensaml.messaging.context.MessageContext,net.shibboleth.utilities.java.support.resolver.CriteriaSet>
tlsCriteriaSetStrategy
TLS CriteriaSet strategy.
-
Constructor Summary
Constructors Constructor Description SAMLSOAPClientContextBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.opensaml.messaging.context.InOutOperationContext
build()
Build the new operation context.private void
errorMissingData(String details)
Convenience method to report out an error due to missing required data.OutboundMessageType
getOutboundMessage()
Get the outbound message.EntityDescriptor
getPeerEntityDescriptor()
Get the SAML peer EntityDscriptor.String
getPeerEntityID()
Get the SAML peer entityID.QName
getPeerEntityRole()
Get the SAML peer role.RoleDescriptor
getPeerRoleDescriptor()
Get the SAML peer RoleDescriptor.String
getPipelineName()
Get the SOAP client message pipeline name to use.String
getProtocol()
Get the SAML protocol URI.String
getSecurityConfigurationProfileId()
Get the SOAP client security configuration profile ID to use.String
getSelfEntityID()
Get the SAML self entityID.Function<org.opensaml.messaging.context.MessageContext,net.shibboleth.utilities.java.support.resolver.CriteriaSet>
getTLSCriteriaSetStrategy()
Get the TLS CriteriaSet strategy.SAMLSOAPClientContextBuilder<InboundMessageType,OutboundMessageType>
setOutboundMessage(OutboundMessageType message)
Set the outbound message.SAMLSOAPClientContextBuilder<InboundMessageType,OutboundMessageType>
setPeerEntityDescriptor(EntityDescriptor entityDescriptor)
Set the SAML peer EntityDescriptor.SAMLSOAPClientContextBuilder<InboundMessageType,OutboundMessageType>
setPeerEntityID(String entityID)
Set the SAML peer entityID.SAMLSOAPClientContextBuilder<InboundMessageType,OutboundMessageType>
setPeerEntityRole(QName role)
Set the SAML peer role.SAMLSOAPClientContextBuilder<InboundMessageType,OutboundMessageType>
setPeerRoleDescriptor(RoleDescriptor roleDescriptor)
Set the SAML peer RoleDescriptor.SAMLSOAPClientContextBuilder<InboundMessageType,OutboundMessageType>
setPipelineName(String name)
Set the SOAP client message pipeline name to use.SAMLSOAPClientContextBuilder<InboundMessageType,OutboundMessageType>
setProtocol(String uri)
Set the SAML protocol URI.SAMLSOAPClientContextBuilder<InboundMessageType,OutboundMessageType>
setSecurityConfigurationProfileId(String profileId)
Set the SOAP client security configuration profile ID to use.SAMLSOAPClientContextBuilder<InboundMessageType,OutboundMessageType>
setSelfEntityID(String entityID)
Set the SAML self entityID.SAMLSOAPClientContextBuilder<InboundMessageType,OutboundMessageType>
setTLSCriteriaSetStrategy(Function<org.opensaml.messaging.context.MessageContext,net.shibboleth.utilities.java.support.resolver.CriteriaSet> strategy)
Set the TLS CriteriaSet strategy.
-
-
-
Field Detail
-
outboundMessage
private OutboundMessageType extends SAMLObject outboundMessage
The outbound message.
-
protocol
private String protocol
The SAML protocol in use.
-
selfEntityID
private String selfEntityID
The SAML self entityID.
-
peerEntityID
private String peerEntityID
The SAML peer entityID.
-
peerEntityRole
private QName peerEntityRole
The SAML peer entity role.
-
peerEntityDescriptor
private EntityDescriptor peerEntityDescriptor
The SAML peer EntityDescriptor.
-
peerRoleDescriptor
private RoleDescriptor peerRoleDescriptor
The SAML peer RoleDescriptor.
-
tlsCriteriaSetStrategy
private Function<org.opensaml.messaging.context.MessageContext,net.shibboleth.utilities.java.support.resolver.CriteriaSet> tlsCriteriaSetStrategy
TLS CriteriaSet strategy.
-
pipelineName
private String pipelineName
SOAP client message pipeline name.
-
securityConfigurationProfileId
private String securityConfigurationProfileId
SOAP client security configuration profile ID.
-
-
Method Detail
-
getOutboundMessage
@Nullable public OutboundMessageType getOutboundMessage()
Get the outbound message.- Returns:
- the outbound message
-
setOutboundMessage
@Nonnull public SAMLSOAPClientContextBuilder<InboundMessageType,OutboundMessageType> setOutboundMessage(OutboundMessageType message)
Set the outbound message.- Parameters:
message
- the outbound message- Returns:
- this builder instance
-
getProtocol
@Nullable public String getProtocol()
Get the SAML protocol URI.- Returns:
- the SAML protocol URI
-
setProtocol
@Nonnull public SAMLSOAPClientContextBuilder<InboundMessageType,OutboundMessageType> setProtocol(String uri)
Set the SAML protocol URI.- Parameters:
uri
- the SAML protocol.- Returns:
- this builder instance
-
getSelfEntityID
@Nullable public String getSelfEntityID()
Get the SAML self entityID.- Returns:
- the SAML self entityID
-
setSelfEntityID
@Nonnull public SAMLSOAPClientContextBuilder<InboundMessageType,OutboundMessageType> setSelfEntityID(String entityID)
Set the SAML self entityID.- Parameters:
entityID
- the SAML self entityID.- Returns:
- this builder instance
-
getPeerEntityID
@Nullable public String getPeerEntityID()
Get the SAML peer entityID.- Returns:
- the SAML peer entityID
-
setPeerEntityID
@Nonnull public SAMLSOAPClientContextBuilder<InboundMessageType,OutboundMessageType> setPeerEntityID(String entityID)
Set the SAML peer entityID.- Parameters:
entityID
- the SAML peer entityID- Returns:
- this builder instance
-
getPeerEntityRole
@Nullable public QName getPeerEntityRole()
Get the SAML peer role.- Returns:
- the SAML peer role
-
setPeerEntityRole
@Nonnull public SAMLSOAPClientContextBuilder<InboundMessageType,OutboundMessageType> setPeerEntityRole(QName role)
Set the SAML peer role.- Parameters:
role
- the SAML peer role- Returns:
- this builder instance
-
getPeerEntityDescriptor
@Nullable public EntityDescriptor getPeerEntityDescriptor()
Get the SAML peer EntityDscriptor.- Returns:
- the SAML peer EntityDescriptor
-
setPeerEntityDescriptor
@Nonnull public SAMLSOAPClientContextBuilder<InboundMessageType,OutboundMessageType> setPeerEntityDescriptor(EntityDescriptor entityDescriptor)
Set the SAML peer EntityDescriptor.- Parameters:
entityDescriptor
- the SAML peer EntityDescriptor- Returns:
- this builder instance
-
getPeerRoleDescriptor
@Nullable public RoleDescriptor getPeerRoleDescriptor()
Get the SAML peer RoleDescriptor.- Returns:
- the SAML peer RoleDescriptor
-
setPeerRoleDescriptor
@Nonnull public SAMLSOAPClientContextBuilder<InboundMessageType,OutboundMessageType> setPeerRoleDescriptor(RoleDescriptor roleDescriptor)
Set the SAML peer RoleDescriptor.- Parameters:
roleDescriptor
- the SAML peer RoleDescriptor.- Returns:
- this builder instance
-
getTLSCriteriaSetStrategy
@Nullable public Function<org.opensaml.messaging.context.MessageContext,net.shibboleth.utilities.java.support.resolver.CriteriaSet> getTLSCriteriaSetStrategy()
Get the TLS CriteriaSet strategy.- Returns:
- the TLS CriteriaSet strategy, or null
-
setTLSCriteriaSetStrategy
@Nonnull public SAMLSOAPClientContextBuilder<InboundMessageType,OutboundMessageType> setTLSCriteriaSetStrategy(@Nullable Function<org.opensaml.messaging.context.MessageContext,net.shibboleth.utilities.java.support.resolver.CriteriaSet> strategy)
Set the TLS CriteriaSet strategy.- Parameters:
strategy
- the strategy- Returns:
- this builder instance
-
getPipelineName
@Nullable public String getPipelineName()
Get the SOAP client message pipeline name to use.- Returns:
- the pipeline name, or null
-
setPipelineName
@Nonnull public SAMLSOAPClientContextBuilder<InboundMessageType,OutboundMessageType> setPipelineName(@Nullable String name)
Set the SOAP client message pipeline name to use.- Parameters:
name
- the pipeline name, or null- Returns:
- this builder instance
-
getSecurityConfigurationProfileId
@Nullable public String getSecurityConfigurationProfileId()
Get the SOAP client security configuration profile ID to use.- Returns:
- the client security configuration profile ID, or null
-
setSecurityConfigurationProfileId
@Nonnull public SAMLSOAPClientContextBuilder<InboundMessageType,OutboundMessageType> setSecurityConfigurationProfileId(@Nullable String profileId)
Set the SOAP client security configuration profile ID to use.- Parameters:
profileId
- the profile ID, or null- Returns:
- this builder instance
-
build
public org.opensaml.messaging.context.InOutOperationContext build() throws org.opensaml.messaging.MessageException
Build the new operation context.- Returns:
- the operation context
- Throws:
org.opensaml.messaging.MessageException
- if any required data is not supplied and can not be derived from other supplied data
-
errorMissingData
private void errorMissingData(@Nonnull String details) throws org.opensaml.messaging.MessageException
Convenience method to report out an error due to missing required data.- Parameters:
details
- the error details- Throws:
org.opensaml.messaging.MessageException
- the error to be reported out
-
-