Package net.shibboleth.idp.authn.impl

# Class StorageBackedAccountLockoutManager.UsernameIPLockoutKeyStrategy

java.lang.Object
net.shibboleth.idp.authn.impl.StorageBackedAccountLockoutManager.UsernameIPLockoutKeyStrategy

All Implemented Interfaces:
  `Function<ProfileRequestContext,String>`

Enclosing class:
  StorageBackedAccountLockoutManager

public static class StorageBackedAccountLockoutManager.UsernameIPLockoutKeyStrategy extends Object implements Function<ProfileRequestContext,String>
A function to generate a key for lockout storage. This effectively defines the scope of the lockout; e.g. if the key depends on the supplied username and client IP address, the lockout will affect only attempts for that username from that client IP.

## Field Summary

Fields
Modifier and Type
Field
Description
`private NonnullSupplier<HttpServletRequest>`
`httpRequestSupplier`
Supplier for the Servlet request to pull client ip from.

## Constructor Summary

Constructors
Constructor
Description
`UsernameIPLockoutKeyStrategy()`

## Method Summary

Modifier and Type
Method
Description
`String`
`apply(ProfileRequestContext profileRequestContext)`
`private HttpServletRequest`
`getHttpServletRequest()`
Get the current HTTP request if available.
`void`
`setHttpServletRequestSupplier(NonnullSupplier<HttpServletRequest> requestSupplier)`
Set the Supplier for the servlet request to read from.

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

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

### Methods inherited from interface java.util.function.Function

`andThen, compose`

## Field Details

### httpRequestSupplier

@Nullable private NonnullSupplier<HttpServletRequest> httpRequestSupplier
Supplier for the Servlet request to pull client ip from.

## Constructor Details

### UsernameIPLockoutKeyStrategy

public UsernameIPLockoutKeyStrategy()

## Method Details

### setHttpServletRequestSupplier

public void setHttpServletRequestSupplier(@Nonnull NonnullSupplier<HttpServletRequest> requestSupplier)
Set the Supplier for the servlet request to read from.

Parameters:
  `requestSupplier` - servlet request Supplier

### getHttpServletRequest

@Nullable private HttpServletRequest getHttpServletRequest()
Get the current HTTP request if available.

Returns:
  current HTTP request

### apply

@Nullable public String apply(@Nullable ProfileRequestContext profileRequestContext)

Specified by:
  `apply` in interface `Function<ProfileRequestContext,String>`