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

# Interface WebAuthnRelyingPartyOperations

All Known Implementing Classes:
  `Webauthn4JRelyingPartyOperations`

public interface WebAuthnRelyingPartyOperations
An API for WebAuthn Relying Party Operations

Since:
  6.4

## Method Summary

Modifier and Type
Method
Description
`PublicKeyCredentialUserEntity`
`authenticate(RelyingPartyAuthenticationRequest request)`
Authenticates the `RelyingPartyAuthenticationRequest` passed in
`PublicKeyCredentialRequestOptions`
`createCredentialRequestOptions(PublicKeyCredentialRequestOptionsRequest request)`
Creates the `PublicKeyCredentialRequestOptions` used to authenticate a user.
`PublicKeyCredentialCreationOptions`
`createPublicKeyCredentialCreationOptions(PublicKeyCredentialCreationOptionsRequest request)`
Creates the `PublicKeyCredentialCreationOptions` used to register new credentials.
`CredentialRecord`
`registerCredential(RelyingPartyRegistrationRequest relyingPartyRegistrationRequest)`
If `RelyingPartyRegistrationRequest` is valid, will register and return a new `CredentialRecord`.

## Method Details

### createPublicKeyCredentialCreationOptions

PublicKeyCredentialCreationOptions createPublicKeyCredentialCreationOptions(PublicKeyCredentialCreationOptionsRequest request)
Creates the `PublicKeyCredentialCreationOptions` used to register new credentials.

Parameters:
  `request` - the `PublicKeyCredentialCreationOptionsRequest` to create the `PublicKeyCredentialCreationOptions`
Returns:
  the `PublicKeyCredentialCreationOptions` for the `Authentication` passed in. Cannot be null.

### registerCredential

CredentialRecord registerCredential(RelyingPartyRegistrationRequest relyingPartyRegistrationRequest)
If `RelyingPartyRegistrationRequest` is valid, will register and return a new `CredentialRecord`.

Parameters:
  `relyingPartyRegistrationRequest` - the `RelyingPartyRegistrationRequest` to process.
Returns:
  a new `CredentialRecord`
Throws:
  `RuntimeException` - if the `RelyingPartyRegistrationRequest` is not valid.

### createCredentialRequestOptions

PublicKeyCredentialRequestOptions createCredentialRequestOptions(PublicKeyCredentialRequestOptionsRequest request)
Creates the `PublicKeyCredentialRequestOptions` used to authenticate a user.

Parameters:
  `request` - the `PublicKeyCredentialRequestOptionsRequest`.
Returns:
  the `PublicKeyCredentialRequestOptions` used to authenticate a user.

### authenticate

PublicKeyCredentialUserEntity authenticate(RelyingPartyAuthenticationRequest request)
Authenticates the `RelyingPartyAuthenticationRequest` passed in

Parameters:
  `request` - the `RelyingPartyAuthenticationRequest`
Returns:
  the principal name (e.g. username) if authentication was successful
Throws:
  `RuntimeException` - if authentication fails