T
- the request typeI
- the type of the input required by this generatorpublic abstract class AbstractRequestGenerator<T extends RequestAbstractType,I extends RequestGeneratorInput> extends Object implements RequestGenerator<T,I>, org.springframework.beans.factory.InitializingBean
Constructor and Description |
---|
AbstractRequestGenerator(String entityID)
Constructor assigning the Service Provider entityID.
|
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected RequestHttpObject<T> |
buildRequestHttpObject(T request,
I input,
String binding,
String destination)
Builds a request HTTP object (including signing).
|
protected String |
generateID()
Generates a request ID.
|
protected abstract String |
getDefaultBinding()
Returns the binding URI for the binding the generator should use if there are more than one possible choice.
|
String |
getEntityID()
Returns the entityID for the Service Provider this request generator is serving.
|
String |
getName()
Returns the display name (for logging etc).
|
protected EntityDescriptor |
getPeerMetadata(RequestGeneratorInput input,
PeerMetadataResolver metadataResolver)
Returns the peer metadata.
|
protected Random |
getRandomizer()
Returns the randomizer for generation of ID:s etc.
|
protected X509Credential |
getSigningCredentials()
Returns the signature credentials.
|
void |
setName(String name)
The human readable name for the SP instance
|
void |
setSigningCredentials(X509Credential signingCredentials)
Assigns the signature credentials for the SP.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
generateRequest
public AbstractRequestGenerator(String entityID)
entityID
- the entityIDprotected EntityDescriptor getPeerMetadata(RequestGeneratorInput input, PeerMetadataResolver metadataResolver) throws RequestGenerationException
input
- the request generation inputmetadataResolver
- the metadata resolverRequestGenerationException
- if no metadata is foundprotected RequestHttpObject<T> buildRequestHttpObject(T request, I input, String binding, String destination) throws RequestGenerationException
request
- the actual requestinput
- the request generation inputbinding
- the binding to usedestination
- the destination URLRequestGenerationException
- for errors during signing or encodingprotected String generateID()
protected X509Credential getSigningCredentials()
protected Random getRandomizer()
protected abstract String getDefaultBinding()
RequestGeneratorInput.getPreferredBinding()
.public String getEntityID()
getEntityID
in interface RequestGenerator<T extends RequestAbstractType,I extends RequestGeneratorInput>
public String getName()
getName
in interface RequestGenerator<T extends RequestAbstractType,I extends RequestGeneratorInput>
public void setName(String name)
name
- the namepublic void setSigningCredentials(X509Credential signingCredentials)
signingCredentials
- signature credentialsCopyright © 2018 Litsec AB. All rights reserved.