Class AbstractAuthnRequestBuilder<BUILDER extends AbstractSAMLObjectBuilder<AuthnRequest>>
- java.lang.Object
-
- se.litsec.opensaml.core.AbstractSAMLObjectBuilder<T>
-
- se.litsec.opensaml.saml2.core.build.AbstractRequestBuilder<AuthnRequest,BUILDER>
-
- se.litsec.opensaml.saml2.core.build.AbstractAuthnRequestBuilder<BUILDER>
-
- All Implemented Interfaces:
SAMLObjectBuilder<AuthnRequest>
- Direct Known Subclasses:
AuthnRequestBuilder,ExtendedAuthnRequestBuilder
public abstract class AbstractAuthnRequestBuilder<BUILDER extends AbstractSAMLObjectBuilder<AuthnRequest>> extends AbstractRequestBuilder<AuthnRequest,BUILDER>
Abstract builder forAuthnRequestmessages.
-
-
Constructor Summary
Constructors Constructor Description AbstractAuthnRequestBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BUILDERassertionConsumerServiceIndex(Integer index)Assigns theAssertionConsumerServiceIndexattribute to theAuthnRequestobject.BUILDERassertionConsumerServiceURL(String url)Assigns theAssertionConsumerServiceURLattribute to theAuthnRequestobject.BUILDERattributeConsumerServiceIndex(Integer index)Assigns theAttributeConsumerServiceIndexattribute to theAuthnRequestobject.AuthnRequestbuild()The default implementation of this method assumes that the object has been built during assignment of its attributes and elements so it simply returns the object.BUILDERconditions(Conditions conditions)Assigns aConditionselement to theAuthnRequestobject.BUILDERforceAuthn(Boolean b)Assigns theForceAuthnattribute to theAuthnRequestobject.protected Class<AuthnRequest>getObjectType()Returns the object type.BUILDERisPassive(Boolean b)Assigns theIsPassiveattribute to theAuthnRequestobject.BUILDERnameIDPolicy(NameIDPolicy nameIDPolicy)Assigns aNameIDPolicyelement to theAuthnRequestobject.BUILDERpostProtocolBinding()AssignsSAMLConstants.SAML2_POST_BINDING_URIto theProtocolBindingattribute of theAuthnRequestobject.BUILDERprotocolBinding(String binding)Assigns theProtocolBindingattribute to theAuthnRequestobject.BUILDERproviderName(String name)Assigns theProviderNameattribute to theAuthnRequestobject.BUILDERrequestedAuthnContext(RequestedAuthnContext requestedAuthnContext)Assigns aRequestedAuthnContextelement to theAuthnRequestobject.BUILDERscoping(Scoping scoping)Assigns aScopingelement to theAuthnRequestobject.BUILDERsubject(Subject subject)Assigns aSubjectelement to theAuthnRequestobject.-
Methods inherited from class se.litsec.opensaml.saml2.core.build.AbstractRequestBuilder
consent, destination, extensions, getThis, id, issueInstant, issuer, issuer, version, version
-
Methods inherited from class se.litsec.opensaml.core.AbstractSAMLObjectBuilder
getDefaultElementName, object
-
-
-
-
Method Detail
-
build
public AuthnRequest build()
The default implementation of this method assumes that the object has been built during assignment of its attributes and elements so it simply returns the object.Implementations that need to perform additional processing during the build step should override this method.
- Specified by:
buildin interfaceSAMLObjectBuilder<BUILDER extends AbstractSAMLObjectBuilder<AuthnRequest>>- Overrides:
buildin classAbstractRequestBuilder<AuthnRequest,BUILDER extends AbstractSAMLObjectBuilder<AuthnRequest>>- Returns:
- the built object
-
forceAuthn
public BUILDER forceAuthn(Boolean b)
Assigns theForceAuthnattribute to theAuthnRequestobject.- Parameters:
b- boolean flag- Returns:
- the builder
-
isPassive
public BUILDER isPassive(Boolean b)
Assigns theIsPassiveattribute to theAuthnRequestobject.- Parameters:
b- boolean flag- Returns:
- the builder
-
protocolBinding
public BUILDER protocolBinding(String binding)
Assigns theProtocolBindingattribute to theAuthnRequestobject.- Parameters:
binding- the binding URI- Returns:
- the builder
- See Also:
postProtocolBinding()
-
postProtocolBinding
public BUILDER postProtocolBinding()
AssignsSAMLConstants.SAML2_POST_BINDING_URIto theProtocolBindingattribute of theAuthnRequestobject.This is the default.
- Returns:
- the builder
-
assertionConsumerServiceIndex
public BUILDER assertionConsumerServiceIndex(Integer index)
Assigns theAssertionConsumerServiceIndexattribute to theAuthnRequestobject.- Parameters:
index- the index- Returns:
- the builder
-
assertionConsumerServiceURL
public BUILDER assertionConsumerServiceURL(String url)
Assigns theAssertionConsumerServiceURLattribute to theAuthnRequestobject.- Parameters:
url- the URL- Returns:
- the builder
-
attributeConsumerServiceIndex
public BUILDER attributeConsumerServiceIndex(Integer index)
Assigns theAttributeConsumerServiceIndexattribute to theAuthnRequestobject.- Parameters:
index- the index- Returns:
- the builder
-
providerName
public BUILDER providerName(String name)
Assigns theProviderNameattribute to theAuthnRequestobject.- Parameters:
name- the provider name- Returns:
- the builder
-
subject
public BUILDER subject(Subject subject)
Assigns aSubjectelement to theAuthnRequestobject.- Parameters:
subject- the subject (will be cloned before assignment)- Returns:
- the builder
-
nameIDPolicy
public BUILDER nameIDPolicy(NameIDPolicy nameIDPolicy)
Assigns aNameIDPolicyelement to theAuthnRequestobject.- Parameters:
nameIDPolicy- the nameID policy (will be cloned before assignment)- Returns:
- the builder
- See Also:
NameIDPolicyBuilder
-
conditions
public BUILDER conditions(Conditions conditions)
Assigns aConditionselement to theAuthnRequestobject.- Parameters:
conditions- the request conditions (will be cloned before assignment)- Returns:
- the builder
-
requestedAuthnContext
public BUILDER requestedAuthnContext(RequestedAuthnContext requestedAuthnContext)
Assigns aRequestedAuthnContextelement to theAuthnRequestobject.- Parameters:
requestedAuthnContext- the requested authentication context (will be cloned before assignment)- Returns:
- the builder
- See Also:
RequestedAuthnContextBuilder
-
scoping
public BUILDER scoping(Scoping scoping)
Assigns aScopingelement to theAuthnRequestobject.- Parameters:
scoping- the scoping element to add (will be cloned before assignment)- Returns:
- the builder
-
getObjectType
protected Class<AuthnRequest> getObjectType()
Returns the object type.- Specified by:
getObjectTypein classAbstractSAMLObjectBuilder<AuthnRequest>- Returns:
- the object type
-
-