Package org.springframework.security.web.webauthn.authentication

# Class HttpSessionPublicKeyCredentialRequestOptionsRepository

java.lang.Object
org.springframework.security.web.webauthn.authentication.HttpSessionPublicKeyCredentialRequestOptionsRepository

All Implemented Interfaces:
  `PublicKeyCredentialRequestOptionsRepository`

public class HttpSessionPublicKeyCredentialRequestOptionsRepository extends Object implements PublicKeyCredentialRequestOptionsRepository
A `PublicKeyCredentialRequestOptionsRepository` that stores the `PublicKeyCredentialRequestOptions` in the `HttpSession`.

Since:
  6.4

## Constructor Summary

Constructors
Constructor
Description
`HttpSessionPublicKeyCredentialRequestOptionsRepository()`

## Method Summary

Modifier and Type
Method
Description
`PublicKeyCredentialRequestOptions`
`load(jakarta.servlet.http.HttpServletRequest request)`
Gets a saved `PublicKeyCredentialRequestOptions` if it exists, otherwise null.
`void`
`save(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, PublicKeyCredentialRequestOptions options)`
Saves the provided `PublicKeyCredentialRequestOptions` or clears an existing `PublicKeyCredentialRequestOptions` if `options` is null.
`void`
`setAttrName(String attrName)`

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

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

## Constructor Details

### HttpSessionPublicKeyCredentialRequestOptionsRepository

public HttpSessionPublicKeyCredentialRequestOptionsRepository()

## Method Details

### save

public void save(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, PublicKeyCredentialRequestOptions options)
Description copied from interface: `PublicKeyCredentialRequestOptionsRepository`
Saves the provided `PublicKeyCredentialRequestOptions` or clears an existing `PublicKeyCredentialRequestOptions` if `options` is null.

Specified by:
  `save` in interface `PublicKeyCredentialRequestOptionsRepository`
Parameters:
  `request` - the `HttpServletRequest`
  `response` - the `HttpServletResponse`
  `options` - the `PublicKeyCredentialRequestOptions` to save or null if an existing `PublicKeyCredentialRequestOptions` should be removed.

### load

public PublicKeyCredentialRequestOptions load(jakarta.servlet.http.HttpServletRequest request)
Description copied from interface: `PublicKeyCredentialRequestOptionsRepository`
Gets a saved `PublicKeyCredentialRequestOptions` if it exists, otherwise null.

Specified by:
  `load` in interface `PublicKeyCredentialRequestOptionsRepository`
Parameters:
  `request` - the `HttpServletRequest`
Returns:
  the `PublicKeyCredentialRequestOptions` that was saved, otherwise null.

### setAttrName

public void setAttrName(String attrName)