Udostępnij za pośrednictwem


AIVisionFaceModelFactory.LivenessSession Method

Definition

Initializes a new instance of LivenessSession.

public static Azure.AI.Vision.Face.LivenessSession LivenessSession (string id = default, DateTimeOffset createdDateTime = default, DateTimeOffset? sessionStartDateTime = default, bool sessionExpired = false, string deviceCorrelationId = default, int? authTokenTimeToLiveInSeconds = default, Azure.AI.Vision.Face.FaceSessionStatus status = default, Azure.AI.Vision.Face.LivenessSessionAuditEntry result = default);
static member LivenessSession : string * DateTimeOffset * Nullable<DateTimeOffset> * bool * string * Nullable<int> * Azure.AI.Vision.Face.FaceSessionStatus * Azure.AI.Vision.Face.LivenessSessionAuditEntry -> Azure.AI.Vision.Face.LivenessSession
Public Shared Function LivenessSession (Optional id As String = Nothing, Optional createdDateTime As DateTimeOffset = Nothing, Optional sessionStartDateTime As Nullable(Of DateTimeOffset) = Nothing, Optional sessionExpired As Boolean = false, Optional deviceCorrelationId As String = Nothing, Optional authTokenTimeToLiveInSeconds As Nullable(Of Integer) = Nothing, Optional status As FaceSessionStatus = Nothing, Optional result As LivenessSessionAuditEntry = Nothing) As LivenessSession

Parameters

id
String

The unique ID to reference this session.

createdDateTime
DateTimeOffset

DateTime when this session was created.

sessionStartDateTime
Nullable<DateTimeOffset>

DateTime when this session was started by the client.

sessionExpired
Boolean

Whether or not the session is expired.

deviceCorrelationId
String

Unique Guid per each end-user device. This is to provide rate limiting and anti-hammering. If 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be null.

authTokenTimeToLiveInSeconds
Nullable<Int32>

Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600.

status
FaceSessionStatus

The current status of the session.

result
LivenessSessionAuditEntry

The latest session audit result only populated if status == 'ResultAvailable'.

Returns

A new LivenessSession instance for mocking.

Applies to