Package org.springframework.security.web.webauthn.management

# Class MapPublicKeyCredentialUserEntityRepository

java.lang.Object
org.springframework.security.web.webauthn.management.MapPublicKeyCredentialUserEntityRepository

All Implemented Interfaces:
  `PublicKeyCredentialUserEntityRepository`

public class MapPublicKeyCredentialUserEntityRepository extends Object implements PublicKeyCredentialUserEntityRepository
A `Map` based implementation of `PublicKeyCredentialUserEntityRepository`.

Since:
  6.4

## Constructor Summary

Constructors
Constructor
Description
`MapPublicKeyCredentialUserEntityRepository()`

## Method Summary

Modifier and Type
Method
Description
`void`
`delete(Bytes id)`
`PublicKeyCredentialUserEntity`
`findById(Bytes id)`
Finds the `PublicKeyCredentialUserEntity` by `PublicKeyCredentialUserEntity.getId()`
`PublicKeyCredentialUserEntity`
`findByUsername(String username)`
Finds the `PublicKeyCredentialUserEntity` by the username.
`void`
`save(PublicKeyCredentialUserEntity userEntity)`
Saves the `PublicKeyCredentialUserEntity` to the associated username.

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

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

## Constructor Details

### MapPublicKeyCredentialUserEntityRepository

public MapPublicKeyCredentialUserEntityRepository()

## Method Details

### findById

public PublicKeyCredentialUserEntity findById(Bytes id)
Description copied from interface: `PublicKeyCredentialUserEntityRepository`
Finds the `PublicKeyCredentialUserEntity` by `PublicKeyCredentialUserEntity.getId()`

Specified by:
  `findById` in interface `PublicKeyCredentialUserEntityRepository`
Parameters:
  `id` - the id to lookup the username by
Returns:
  the username or null if not found.

### findByUsername

public PublicKeyCredentialUserEntity findByUsername(String username)
Description copied from interface: `PublicKeyCredentialUserEntityRepository`
Finds the `PublicKeyCredentialUserEntity` by the username.

Specified by:
  `findByUsername` in interface `PublicKeyCredentialUserEntityRepository`
Parameters:
  `username` - the username to lookup the `PublicKeyCredentialUserEntity`
Returns:
  the `PublicKeyCredentialUserEntity` or null if not found.

### save

public void save(PublicKeyCredentialUserEntity userEntity)
Description copied from interface: `PublicKeyCredentialUserEntityRepository`
Saves the `PublicKeyCredentialUserEntity` to the associated username.

Specified by:
  `save` in interface `PublicKeyCredentialUserEntityRepository`
Parameters:
  `userEntity` - the `PublicKeyCredentialUserEntity` to associate to the provided username. If null, any existing entry is deleted.

### delete

public void delete(Bytes id)

Specified by:
  `delete` in interface `PublicKeyCredentialUserEntityRepository`