Table of Contents

Class IdentityModelFactory

Namespace
Azure.Identity
Assembly
Azure.Identity.dll

Model factory that enables mocking for the Azure Identity library.

public static class IdentityModelFactory
Inheritance
IdentityModelFactory
Inherited Members

Methods

AuthenticationRecord(string, string, string, string, string)

Initializes a new instance of the AuthenticationRecord(string, string, string, string, string) class for mocking purposes.

public static AuthenticationRecord AuthenticationRecord(string username, string authority, string homeAccountId, string tenantId, string clientId)

Parameters

username string

Sets the Username.

authority string

Sets the Authority.

homeAccountId string

Sets the HomeAccountId.

tenantId string

Sets the TenantId.

clientId string

Sets the ClientId.

Returns

AuthenticationRecord

A new instance of the AuthenticationRecord(string, string, string, string, string) for mocking purposes.

DeviceCodeInfo(string, string, Uri, DateTimeOffset, string, string, IReadOnlyCollection<string>)

public static DeviceCodeInfo DeviceCodeInfo(string userCode, string deviceCode, Uri verificationUri, DateTimeOffset expiresOn, string message, string clientId, IReadOnlyCollection<string> scopes)

Parameters

userCode string

Sets the UserCode.

deviceCode string

Sets the DeviceCode.

verificationUri Uri

Sets the VerificationUri.

expiresOn DateTimeOffset

Sets the ExpiresOn.

message string

Sets the Message.

clientId string

Sets the ClientId.

scopes IReadOnlyCollection<string>

Sets the Scopes.

Returns

DeviceCodeInfo

A new instance of the DeviceCodeInfo(string, string, Uri, DateTimeOffset, string, string, IReadOnlyCollection<string>) for mocking purposes.