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

# Class WebAuthnAuthenticationProvider

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

All Implemented Interfaces:
  `org.springframework.security.authentication.AuthenticationProvider`

public class WebAuthnAuthenticationProvider extends Object implements org.springframework.security.authentication.AuthenticationProvider
An `AuthenticationProvider` that uses `WebAuthnRelyingPartyOperations` for authentication using an `WebAuthnAuthenticationRequestToken`. First `WebAuthnRelyingPartyOperations.authenticate(RelyingPartyAuthenticationRequest)` is invoked. The result is a username passed into `UserDetailsService`. The `UserDetails` is used to create an `Authentication`.

Since:
  6.4

## Constructor Summary

Constructors
Constructor
Description
`WebAuthnAuthenticationProvider(WebAuthnRelyingPartyOperations relyingPartyOperations, org.springframework.security.core.userdetails.UserDetailsService userDetailsService)`
Creates a new instance.

## Method Summary

Modifier and Type
Method
Description
`org.springframework.security.core.Authentication`
`authenticate(org.springframework.security.core.Authentication authentication)`
`boolean`
`supports(Class<?> authentication)`

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

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

## Constructor Details

### WebAuthnAuthenticationProvider

public WebAuthnAuthenticationProvider(WebAuthnRelyingPartyOperations relyingPartyOperations, org.springframework.security.core.userdetails.UserDetailsService userDetailsService)
Creates a new instance.

Parameters:
  `relyingPartyOperations` - the `WebAuthnRelyingPartyOperations` to use. Cannot be null.
  `userDetailsService` - the `UserDetailsService` to use. Cannot be null.

## Method Details

### authenticate

public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException

Specified by:
  `authenticate` in interface `org.springframework.security.authentication.AuthenticationProvider`
Throws:
  `org.springframework.security.core.AuthenticationException`

### supports

public boolean supports(Class<?> authentication)

Specified by:
  `supports` in interface `org.springframework.security.authentication.AuthenticationProvider`