@digitalpersona/authentication
Version:
DigitalPersona Authentication API
31 lines (17 loc) • 1.14 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@digitalpersona/authentication](./authentication.md) > [ProximityCardAuth](./authentication.proximitycardauth.md) > [identify](./authentication.proximitycardauth.identify.md)
## ProximityCardAuth.identify() method
Identifies the user with a proximity card.
<b>Signature:</b>
```typescript
identify(cardData: string): Promise<JSONWebToken>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| cardData | <code>string</code> | card authentication data received from the card using a <code>CardsReader.getCardAuthData</code>. |
<b>Returns:</b>
`Promise<JSONWebToken>`
a promise to return a JSON Web Token containing a subject identity claims (`sub`<!-- -->, `group`<!-- -->, etc) and a claim (`crd`<!-- -->) showing the fact a proximity card was used. Will reject if identification fails.
## Remarks
If the `identity` parameter is a user name, a new token will be created. If the `identity` parameter is a JSON Web Token, an updated token will be returned.