@digitalpersona/enrollment
Version:
DigitalPersona Enrollment API
41 lines (26 loc) • 1.98 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@digitalpersona/enrollment](./enrollment.md) > [EnrollmentContext](./enrollment.enrollmentcontext.md)
## EnrollmentContext class
Enrollment context.
<b>Signature:</b>
```typescript
export declare class EnrollmentContext
```
## Constructors
| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(enrollService, user, securityOfficer)](./enrollment.enrollmentcontext.(constructor).md) | | Constructs a new instance of the <code>EnrollmentContext</code> class |
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [enrollService](./enrollment.enrollmentcontext.enrollservice.md) | | <code>IEnrollService</code> | DigitalPersona Enrollment web service client |
| [securityOfficer](./enrollment.enrollmentcontext.securityofficer.md) | | <code>JSONWebToken | undefined</code> | An optional JSON Web Token of a security officer performing an attended enrollment. If not provided, the API should try to use a user's own token instead for a self-enrollment. In this case the user must be allowed to do self-enrollment. |
| [user](./enrollment.enrollmentcontext.user.md) | | <code>JSONWebToken | User</code> | A JSON Web Token or a username of a user whose credentials are to be enrolled. |
## Methods
| Method | Modifiers | Description |
| --- | --- | --- |
| [getJWT()](./enrollment.enrollmentcontext.getjwt.md) | | Returns user identity in a form of authentication token. |
| [getUser()](./enrollment.enrollmentcontext.getuser.md) | | Returns user identity in a form of a username. |
| [isAuthenticated()](./enrollment.enrollmentcontext.isauthenticated.md) | | Check is the user has an authentication token, or just a user name. |
## Remarks
Pass the context object into token enrollment APIs. The single context may be shared.