Package org.opensaml.saml.saml2.assertion.messaging

# Class HttpServletRequestNetworkInformationSupplier

java.lang.Object
org.opensaml.saml.saml2.assertion.messaging.HttpServletRequestNetworkInformationSupplier

All Implemented Interfaces:
  `AssertionValidationNetworkInformationSupplier`

public class HttpServletRequestNetworkInformationSupplier extends Object implements AssertionValidationNetworkInformationSupplier
Implementation of `AssertionValidationNetworkInformationSupplier` which wraps an instance of `HttpServletRequest`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private HttpServletRequest`
`servletRequest`
The wrapped servlet request.

## Constructor Summary

Constructors
Constructor
Description
`HttpServletRequestNetworkInformationSupplier(HttpServletRequest request)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`X509Certificate`
`getAttesterCertificate()`
The X.509 certificate presented by the attesting party, may be null.
`String`
`getAttesterIPAddress()`
The attesting party's IP address, may be null.
`String`
`getReceiverEndpointURI()`
The endpoint URI at which the assertion being validated was received, may be null.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### servletRequest

@Nonnull private HttpServletRequest servletRequest
The wrapped servlet request.

## Constructor Details

### HttpServletRequestNetworkInformationSupplier

public HttpServletRequestNetworkInformationSupplier(@Nonnull HttpServletRequest request)
Constructor.

Parameters:
  `request` - the servlet request instanc3

## Method Details

### getAttesterCertificate

@Nullable public X509Certificate getAttesterCertificate()
The X.509 certificate presented by the attesting party, may be null.

Specified by:
  `getAttesterCertificate` in interface `AssertionValidationNetworkInformationSupplier`
Returns:
  the attesting party's certificate, or null

### getAttesterIPAddress

@Nullable public String getAttesterIPAddress()
The attesting party's IP address, may be null.

For IPv6 addresses this should be in "sanitized" form, without enclosing square brackets.

Specified by:
  `getAttesterIPAddress` in interface `AssertionValidationNetworkInformationSupplier`
Returns:
  the attesting party's IP address, or null if not known

### getReceiverEndpointURI

@Nullable public String getReceiverEndpointURI()
The endpoint URI at which the assertion being validated was received, may be null.

Specified by:
  `getReceiverEndpointURI` in interface `AssertionValidationNetworkInformationSupplier`
Returns:
  the endpoint URI, or null if not applicable