Overview

Namespaces

  • Comprobo
    • Verify
      • Auth
      • Exceptions
      • HTTP

Classes

  • Api
  • Factory
  • State
  • User
  • Workflow
  • Overview
  • Namespace
  • Class

Class User

User service integration

Namespace: Comprobo\Verify
Located at User.php
Methods summary
public
# __construct( array $config, Comprobo\Verify\Factory $factory, Comprobo\Verify\State $state )
public array
# create( string $firstName, string $lastName, string $email )

Create a new user in Comprobo. This user will not be given a direct login of their own, but must be impersonated to be used.

Create a new user in Comprobo. This user will not be given a direct login of their own, but must be impersonated to be used.

Parameters

$firstName
assigned to the user account and may be displayed in reports or other feedback.
$lastName
assigned to the user account and may be displayed in reports or other feedback.
$email
assigned to the user account and may be displayed in reports or other feedback.

Returns

array

the service response. Responsibilty falls on the caller to validate and extract relevant information

Throws

Comprobo\Verify\Exceptions\Auth
if the state is invalid

See

Comprobo\Verify\Api::impersonate method to impersonate a user when we have their unique ID.
public string
# token( string $uuid )

Ask the authentication service for a token to impersonate a test-taking user. This token should be passed to the JavaScript SDK when displaying the block and does not replace the API token used for normal tasks.

Ask the authentication service for a token to impersonate a test-taking user. This token should be passed to the JavaScript SDK when displaying the block and does not replace the API token used for normal tasks.

Parameters

$uuid
the Comprobo user ID.

Returns

string
the user token

Throws

Comprobo\Verify\Exceptions\User
if the token cannot be requested or the service response is invalid
Comprobo\Verify\Exceptions\Auth
If the API has not yet been authenticated

See

Comprobo\Verify\Api::authenticate
public boolean
# assignWorkflow( string $userId, string $workflowId )

Parameters

$userId
Comprobo user ID
$workflowId
Comprobo workflow ID

Returns

boolean
true

Throws

Comprobo\Verify\Exceptions\Auth
If the API has not yet been authenticated

See

Comprobo\Verify\Api::authenticate
API documentation generated by ApiGen