Edit

Share via


MockProvider Class

Definition

Caution

MockProvider is meant for prototyping and demonstration purposes only. Not for use in production applications.

Provider to connect to the example data set for Microsoft Graph. Useful for prototyping and samples.

[System.Obsolete("MockProvider is meant for prototyping and demonstration purposes only. Not for use in production applications.")]
public class MockProvider : CommunityToolkit.Authentication.BaseProvider
[<System.Obsolete("MockProvider is meant for prototyping and demonstration purposes only. Not for use in production applications.")>]
type MockProvider = class
    inherit BaseProvider
Public Class MockProvider
Inherits BaseProvider
Inheritance
MockProvider
Attributes

Constructors

MockProvider(Boolean)

Initializes a new instance of the MockProvider class.

Properties

CurrentAccountId

Gets the id of the currently signed in user account.

State

Gets or sets the current state of the provider.

(Inherited from BaseProvider)

Methods

AddSdkVersion(HttpRequestMessage)

Append the Sdk version to the request headers.

(Inherited from BaseProvider)
AuthenticateRequestAsync(HttpRequestMessage)

Authenticate an outgoing request.

GetTokenAsync(Boolean)

Retrieve a token for the authenticated user.

SignInAsync()

Sign in the user.

SignOutAsync()

Sign out the user.

TrySilentSignInAsync()

Tries to check if the user is logged in without prompting to login.

Events

StateChanged

Event called when the login State changes.

(Inherited from BaseProvider)

Extension Methods

GetBetaClient(IProvider)

Gets a GraphServiceClient instance based on the current GlobalProvider, but configured for the beta endpoint.

GetClient(IProvider)

Gets a GraphServiceClient instance based on the current GlobalProvider.

Applies to