Class DefaultVOMSACService
- java.lang.Object
-
- org.italiangrid.voms.request.impl.DefaultVOMSACService
-
- All Implemented Interfaces:
VOMSACService
public class DefaultVOMSACService extends java.lang.Object implements VOMSACService
The default implementation of theVOMSACService
.- Author:
- Valerio Venturi, Andrea Ceccanti
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultVOMSACService.Builder
Creates aDefaultVOMSACService
object.
-
Field Summary
Fields Modifier and Type Field Description protected VOMSProtocol
httpProtocol
The http protocol implementationprotected VOMSProtocol
legacyProtocol
The voms legacy protocol implementationprotected VOMSProtocolListener
protocolListener
The listener that will be informed about low-level protocol detailsprotected VOMSRequestListener
requestListener
The listener that will be informed about request eventsprotected VOMSServerInfoStore
serverInfoStore
The store used to keep VOMS server contact information.protected eu.emi.security.authn.x509.X509CertChainValidatorExt
validator
The validator used for the SSL handshake
-
Constructor Summary
Constructors Modifier Constructor Description protected
DefaultVOMSACService(DefaultVOMSACService.Builder builder)
Constructor which builds aDefaultVOMSACService
from aDefaultVOMSACService.Builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.bouncycastle.asn1.x509.AttributeCertificate
getACFromResponse(VOMSACRequest request, VOMSResponse response)
Extracts an AC from a VOMS responseorg.bouncycastle.asn1.x509.AttributeCertificate
getVOMSAttributeCertificate(eu.emi.security.authn.x509.X509Credential credential, VOMSACRequest request)
Returns anAttributeCertificate
given aVOMSACRequest
for VOMS attributes.protected java.util.List<VOMSServerInfo>
getVOMSServerInfos(VOMSACRequest request)
Get VOMS server endpoint information that matches with theVOMSACRequest
passed as argument.protected void
handleErrorsInResponse(VOMSACRequest request, VOMSServerInfo si, VOMSResponse response)
Handles errors included in the VOMS responseprotected void
handleWarningsInResponse(VOMSACRequest request, VOMSServerInfo si, VOMSResponse response)
Handles warnings included in the VOMS response
-
-
-
Field Detail
-
requestListener
protected VOMSRequestListener requestListener
The listener that will be informed about request events
-
protocolListener
protected VOMSProtocolListener protocolListener
The listener that will be informed about low-level protocol details
-
validator
protected eu.emi.security.authn.x509.X509CertChainValidatorExt validator
The validator used for the SSL handshake
-
serverInfoStore
protected VOMSServerInfoStore serverInfoStore
The store used to keep VOMS server contact information.
-
httpProtocol
protected VOMSProtocol httpProtocol
The http protocol implementation
-
legacyProtocol
protected VOMSProtocol legacyProtocol
The voms legacy protocol implementation
-
-
Constructor Detail
-
DefaultVOMSACService
protected DefaultVOMSACService(DefaultVOMSACService.Builder builder)
Constructor which builds aDefaultVOMSACService
from aDefaultVOMSACService.Builder
- Parameters:
builder
- the builder object that provides the settings for thisVOMSACService
-
-
Method Detail
-
getACFromResponse
protected org.bouncycastle.asn1.x509.AttributeCertificate getACFromResponse(VOMSACRequest request, VOMSResponse response)
Extracts an AC from a VOMS response- Parameters:
request
- the requestresponse
- the received response- Returns:
- a possibly
null
AttributeCertificate
object
-
handleErrorsInResponse
protected void handleErrorsInResponse(VOMSACRequest request, VOMSServerInfo si, VOMSResponse response)
Handles errors included in the VOMS response- Parameters:
request
- the requestsi
- the VOMS server endpoint informationresponse
- the receivedVOMSResponse
-
handleWarningsInResponse
protected void handleWarningsInResponse(VOMSACRequest request, VOMSServerInfo si, VOMSResponse response)
Handles warnings included in the VOMS response- Parameters:
request
- the requestsi
- the VOMS server endpoint informationresponse
- the receivedVOMSResponse
-
getVOMSAttributeCertificate
public org.bouncycastle.asn1.x509.AttributeCertificate getVOMSAttributeCertificate(eu.emi.security.authn.x509.X509Credential credential, VOMSACRequest request)
Description copied from interface:VOMSACService
Returns anAttributeCertificate
given aVOMSACRequest
for VOMS attributes.- Specified by:
getVOMSAttributeCertificate
in interfaceVOMSACService
- Parameters:
credential
- the credential to be used when contacting the servicerequest
- the request for VOMS attributes- Returns:
- a possibly null
AttributeCertificate
containing (a subset of) the requested attributes.
-
getVOMSServerInfos
protected java.util.List<VOMSServerInfo> getVOMSServerInfos(VOMSACRequest request)
Get VOMS server endpoint information that matches with theVOMSACRequest
passed as argument. This method returns a random shuffle of theVOMSServerInfo
objects that match the input request.- Parameters:
request
- the request- Returns:
- a possibly empty
List
ofVOMSServerInfo
objects
-
-