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

# Class WebAuthnAuthentication

java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.web.webauthn.authentication.WebAuthnAuthentication

All Implemented Interfaces:
  `Serializable`, `Principal`, `org.springframework.security.core.Authentication`, `org.springframework.security.core.CredentialsContainer`

public class WebAuthnAuthentication extends org.springframework.security.authentication.AbstractAuthenticationToken
A `WebAuthnAuthentication` is used to represent successful authentication with WebAuthn.

Since:
  6.4
See Also:
  - `WebAuthnAuthenticationRequestToken`
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`WebAuthnAuthentication(PublicKeyCredentialUserEntity principal, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)`

## Method Summary

Modifier and Type
Method
Description
`Object`
`getCredentials()`
`String`
`getName()`
`PublicKeyCredentialUserEntity`
`getPrincipal()`
`void`
`setAuthenticated(boolean authenticated)`

### Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken

`equals, eraseCredentials, getAuthorities, getDetails, hashCode, isAuthenticated, setDetails, toString`

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

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.security.Principal

`implies`

## Constructor Details

### WebAuthnAuthentication

public WebAuthnAuthentication(PublicKeyCredentialUserEntity principal, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)

## Method Details

### setAuthenticated

public void setAuthenticated(boolean authenticated)

Specified by:
  `setAuthenticated` in interface `org.springframework.security.core.Authentication`
Overrides:
  `setAuthenticated` in class `org.springframework.security.authentication.AbstractAuthenticationToken`

### getCredentials

public Object getCredentials()

### getPrincipal

public PublicKeyCredentialUserEntity getPrincipal()

### getName

public String getName()

Specified by:
  `getName` in interface `Principal`
Overrides:
  `getName` in class `org.springframework.security.authentication.AbstractAuthenticationToken`