UNPKG

@digitalpersona/authentication

Version:
31 lines (17 loc) 1.15 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@digitalpersona/authentication](./authentication.md) &gt; [ContactlessCardAuth](./authentication.contactlesscardauth.md) &gt; [identify](./authentication.contactlesscardauth.identify.md) ## ContactlessCardAuth.identify() method Identifies the user with a contactless 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 contactless 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.