# PublicKeyCredentialParameters

Namespace: **Wisej.Ext.WebAuthn**

Assembly: **Wisej.Ext.WebAuthn** (3.2.0.0)

Contains information about the desired properties of the credential to be created.

{% tabs %}
{% tab title="C#" %}

```csharp
public class PublicKeyCredentialParameters
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class PublicKeyCredentialParameters
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](https://2248866391-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MFp7MR1wemvcC5891_r%2F-MirBc8UH2o1iZfh0jrC%2F-MirBsnmjWIxMsN8l0Ms%2Finstance.png?alt=media\&token=dff77e9a-7d55-4c1e-9ef7-ac9092f4f565)PublicKeyCredentialParameters()

Creates a new instance of [PublicKeyCredentialParameters](https://docs.wisej.com/extensions/extensions/webauthn/api/wisej.ext.webauthn.publickeycredentialparameters).

### ![](https://2248866391-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MFp7MR1wemvcC5891_r%2F-MirBc8UH2o1iZfh0jrC%2F-MirBsnmjWIxMsN8l0Ms%2Finstance.png?alt=media\&token=dff77e9a-7d55-4c1e-9ef7-ac9092f4f565)PublicKeyCredentialParameters(alg, type)

Creates a new instance of [PublicKeyCredentialParameters](https://docs.wisej.com/extensions/extensions/webauthn/api/wisej.ext.webauthn.publickeycredentialparameters) with the given configuration.

| Name     | Type                                                                                                                            | Description                                     |
| -------- | ------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
| **alg**  | [COSEAlgorithmIdentifier](https://docs.wisej.com/extensions/extensions/webauthn/api/wisej.ext.webauthn.cosealgorithmidentifier) |                                                 |
| **type** | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)                                                             | The type of credential key (i.e. "public-key"). |

## Properties

### ![](https://2248866391-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MFp7MR1wemvcC5891_r%2F-MirBc8UH2o1iZfh0jrC%2F-MirBsnmjWIxMsN8l0Ms%2Finstance.png?alt=media\&token=dff77e9a-7d55-4c1e-9ef7-ac9092f4f565)Alg

[COSEAlgorithmIdentifier](https://docs.wisej.com/extensions/extensions/webauthn/api/wisej.ext.webauthn.cosealgorithmidentifier): Specifies the cryptographic signature algorithm with which the newly generated credential will be used, and thus also the type of asymmetric key pair to be generated, e.g., RSA or Elliptic Curve.

### ![](https://2248866391-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MFp7MR1wemvcC5891_r%2F-MirBc8UH2o1iZfh0jrC%2F-MirBsnmjWIxMsN8l0Ms%2Finstance.png?alt=media\&token=dff77e9a-7d55-4c1e-9ef7-ac9092f4f565)Type

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): This member specifies the type of credential to be created (i.e. "public-key").

## Methods

### ![](https://2248866391-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MFp7MR1wemvcC5891_r%2F-MirBc8UH2o1iZfh0jrC%2F-MirBsnmjWIxMsN8l0Ms%2Finstance.png?alt=media\&token=dff77e9a-7d55-4c1e-9ef7-ac9092f4f565)ToJSON()

Returns a JSON representation of the current object.

**Returns:** [String](https://docs.microsoft.com/en-us/dotnet/api/system.string). The JSON object representation.
