authenticate method

Future<DVApiPrincipal?> authenticate(
  1. String accessToken, {
  2. String? tenant,
})

The principal accessToken authenticates as, or null.

tenant is the tenant the request resolved to; when it is not given and the call runs in a DV.Tenants.withTenant scope, that tenant is used.

Implementation

Future<DVApiPrincipal?> authenticate(
  String accessToken, {
  String? tenant,
}) async => (await _resolve(accessToken, tenant))?.$2;