Class IdentityModelFactory
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
stringSets the Username.
authority
stringSets the Authority.
homeAccountId
stringSets the HomeAccountId.
tenantId
stringSets the TenantId.
clientId
stringSets 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>)
Initializes a new instance of the DeviceCodeInfo(string, string, Uri, DateTimeOffset, string, string, IReadOnlyCollection<string>) class for mocking purposes.
public static DeviceCodeInfo DeviceCodeInfo(string userCode, string deviceCode, Uri verificationUri, DateTimeOffset expiresOn, string message, string clientId, IReadOnlyCollection<string> scopes)
Parameters
userCode
stringSets the UserCode.
deviceCode
stringSets the DeviceCode.
verificationUri
UriSets the VerificationUri.
expiresOn
DateTimeOffsetSets the ExpiresOn.
message
stringSets the Message.
clientId
stringSets 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.