public class DefaultVOMSACService extends java.lang.Object implements VOMSACService
VOMSACService
.Modifier and Type | Class and Description |
---|---|
static class |
DefaultVOMSACService.Builder
Creates a
DefaultVOMSACService object. |
Modifier and Type | Field and Description |
---|---|
protected VOMSProtocol |
httpProtocol
The http protocol implementation
|
protected VOMSProtocol |
legacyProtocol
The voms legacy protocol implementation
|
protected boolean |
legacyProtocolEnabled
Whether VOMS legacy protocol should be used as a fallback when REST protocol fails
|
protected VOMSProtocolListener |
protocolListener
The listener that will be informed about low-level protocol details
|
protected VOMSRequestListener |
requestListener
The listener that will be informed about request events
|
protected 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
|
Modifier | Constructor and Description |
---|---|
protected |
DefaultVOMSACService(DefaultVOMSACService.Builder builder)
Constructor which builds a
DefaultVOMSACService from a DefaultVOMSACService.Builder |
Modifier and Type | Method and Description |
---|---|
private VOMSResponse |
doRequest(VOMSProtocol protocol,
VOMSServerInfo endpoint,
eu.emi.security.authn.x509.X509Credential cred,
VOMSACRequest req) |
protected org.bouncycastle.asn1.x509.AttributeCertificate |
getACFromResponse(VOMSACRequest request,
VOMSResponse response)
Extracts an AC from a VOMS response
|
org.bouncycastle.asn1.x509.AttributeCertificate |
getVOMSAttributeCertificate(eu.emi.security.authn.x509.X509Credential credential,
VOMSACRequest request)
Returns an
AttributeCertificate given a VOMSACRequest for
VOMS attributes. |
protected java.util.List<VOMSServerInfo> |
getVOMSServerInfos(VOMSACRequest request)
Get VOMS server endpoint information that matches with the
VOMSACRequest passed as
argument. |
protected void |
handleErrorsInResponse(VOMSACRequest request,
VOMSServerInfo si,
VOMSResponse response)
Handles errors included in the VOMS response
|
protected void |
handleWarningsInResponse(VOMSACRequest request,
VOMSServerInfo si,
VOMSResponse response)
Handles warnings included in the VOMS response
|
protected final VOMSRequestListener requestListener
protected final VOMSProtocolListener protocolListener
protected final eu.emi.security.authn.x509.X509CertChainValidatorExt validator
protected final VOMSServerInfoStore serverInfoStore
protected final VOMSProtocol httpProtocol
protected final VOMSProtocol legacyProtocol
protected final boolean legacyProtocolEnabled
protected DefaultVOMSACService(DefaultVOMSACService.Builder builder)
DefaultVOMSACService
from a DefaultVOMSACService.Builder
builder
- the builder object that provides the settings for this VOMSACService
protected org.bouncycastle.asn1.x509.AttributeCertificate getACFromResponse(VOMSACRequest request, VOMSResponse response)
request
- the requestresponse
- the received responsenull
AttributeCertificate
objectprivate VOMSResponse doRequest(VOMSProtocol protocol, VOMSServerInfo endpoint, eu.emi.security.authn.x509.X509Credential cred, VOMSACRequest req)
protected void handleErrorsInResponse(VOMSACRequest request, VOMSServerInfo si, VOMSResponse response)
request
- the requestsi
- the VOMS server endpoint informationresponse
- the received VOMSResponse
protected void handleWarningsInResponse(VOMSACRequest request, VOMSServerInfo si, VOMSResponse response)
request
- the requestsi
- the VOMS server endpoint informationresponse
- the received VOMSResponse
public org.bouncycastle.asn1.x509.AttributeCertificate getVOMSAttributeCertificate(eu.emi.security.authn.x509.X509Credential credential, VOMSACRequest request)
VOMSACService
AttributeCertificate
given a VOMSACRequest
for
VOMS attributes.getVOMSAttributeCertificate
in interface VOMSACService
credential
- the credential to be used when contacting the servicerequest
- the request for VOMS attributesAttributeCertificate
containing (a subset
of) the requested attributes.protected java.util.List<VOMSServerInfo> getVOMSServerInfos(VOMSACRequest request)
VOMSACRequest
passed as
argument.
This method returns a random shuffle of the VOMSServerInfo
objects that match the input
request.request
- the requestList
of VOMSServerInfo
objects