Package be.e_contract.ejsf.component.webauthn

# Class WebAuthnUtils

java.lang.Object
be.e_contract.ejsf.component.webauthn.WebAuthnUtils

public class WebAuthnUtils extends Object
WebAuthn Utility class. This prevents JSF class loading errors when WebAuthn component dependencies are not available at runtime.

Author:
  Frank Cornelis

## Constructor Summary

Constructors
Constructor
Description
`WebAuthnUtils()`

## Method Summary

Modifier and Type
Method
Description
`static String`
`addAuthenticationPRF(String publicKeyCredentialRequestOptions, Function<com.yubico.webauthn.data.ByteArray,com.yubico.webauthn.data.ByteArray> salter)`
`static String`
`addRegistrationPRF(String publicKeyCredentialCreationOptions)`
`static String`
`fixAuthenticationResponse(String authenticationResponse)`
Fix for Safari userHandle: "" in case of non-resident keys.
`static com.yubico.webauthn.data.ByteArray`
`getPRFResults(String assertionResponse)`
`static Boolean`
`hasPRF(String createResponse)`
`static String`
`toCredentialsJson(com.yubico.webauthn.AssertionRequest assertionRequest)`
`static String`
`toJson(com.yubico.webauthn.AssertionRequest assertionRequest)`
`static String`
`toJson(com.yubico.webauthn.data.PublicKeyCredentialCreationOptions publicKeyCredentialCreationOptions)`
`static com.fasterxml.jackson.databind.JsonNode`
`toJsonNode(String json)`

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

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

## Constructor Details

### WebAuthnUtils

public WebAuthnUtils()

## Method Details

### toJson

public static String toJson(com.yubico.webauthn.data.PublicKeyCredentialCreationOptions publicKeyCredentialCreationOptions)

### toJson

public static String toJson(com.yubico.webauthn.AssertionRequest assertionRequest)

### toCredentialsJson

public static String toCredentialsJson(com.yubico.webauthn.AssertionRequest assertionRequest)

### toJsonNode

public static com.fasterxml.jackson.databind.JsonNode toJsonNode(String json)

### addAuthenticationPRF

public static String addAuthenticationPRF(String publicKeyCredentialRequestOptions, Function<com.yubico.webauthn.data.ByteArray,com.yubico.webauthn.data.ByteArray> salter)

### addRegistrationPRF

public static String addRegistrationPRF(String publicKeyCredentialCreationOptions)

### hasPRF

public static Boolean hasPRF(String createResponse)

### getPRFResults

public static com.yubico.webauthn.data.ByteArray getPRFResults(String assertionResponse)

### fixAuthenticationResponse

public static String fixAuthenticationResponse(String authenticationResponse)
Fix for Safari userHandle: "" in case of non-resident keys. See also: https://bugs.webkit.org/show_bug.cgi?id=239737

Parameters:
  `authenticationResponse` -
Returns: