# PrivateKeyInput (/docs/auth/api/type-aliases/PrivateKeyInput)



[@kysoql/auth](/docs/auth/api) / PrivateKeyInput

```ts
type PrivateKeyInput =
  | {
  type: "crypto-key";
  key: CryptoKey;
}
  | {
  type: "pem";
  value: string;
}
  | {
  type: "file";
  path: string | URL;
};
```

Supported sources for the RSA private key used to sign Salesforce JWT
assertions.

## Union Members [#union-members]

### Type Literal [#type-literal]

```ts
{
  type: "crypto-key";
  key: CryptoKey;
}
```

| Name   | Type           | Description                                 |
| ------ | -------------- | ------------------------------------------- |
| `type` | `"crypto-key"` | Selects an already-imported Web Crypto key. |
| `key`  | `CryptoKey`    | RSA private key used for RS256 signing.     |

***

### Type Literal [#type-literal-1]

```ts
{
  type: "pem";
  value: string;
}
```

| Name    | Type     | Description                                   |
| ------- | -------- | --------------------------------------------- |
| `type`  | `"pem"`  | Selects an in-memory PEM-encoded private key. |
| `value` | `string` | PEM-encoded PKCS#8 RSA private key.           |

***

### Type Literal [#type-literal-2]

```ts
{
  type: "file";
  path: string | URL;
}
```

| Name   | Type              | Description                                       |
| ------ | ----------------- | ------------------------------------------------- |
| `type` | `"file"`          | Selects a private key loaded from the filesystem. |
| `path` | `string` \| `URL` | Path or file URL containing the private key.      |
