C# Class Sport.Mobile.Shared.AuthenticationViewModel

Inheritance: BaseViewModel
ファイルを表示 Open project: xamarin/Sport Class Usage Examples

Private Properties

Property Type Description
AuthenticateWithAzure Task
GetAllLeaderboards System.Threading.Tasks.Task
GetAthletesProfile Task
RegisterAthlete Task
SetIdentityValues System.Threading.Tasks.Task

Public Methods

Method Description
Authenticate ( ) : System.Threading.Tasks.Task

Shows the Google authentication web view so the user can authenticate and gets the user's Google profile from Google API

GetUserProfile ( MobileServiceAuthenticationProvider provider ) : Task
GetUserProfile ( ) : Task

Attempts to get the user profile from Google. Will use the refresh token if the auth token has expired Will set App.CurrentAthlete to the athlete data from Azure

LogOut ( bool clearCookies ) : System.Threading.Tasks.Task

Private Methods

Method Description
AuthenticateWithAzure ( ) : Task

Authenticates the athlete against the Azure backend and loads all necessary data to begin the app experience

GetAllLeaderboards ( ) : System.Threading.Tasks.Task

Gets all leaderboards for the system

GetAthletesProfile ( ) : Task

Gets the athlete's profile from the Azure backend

RegisterAthlete ( IUserProfile profile ) : Task

Registers an athlete with the backend and returns the new athlete profile

SetIdentityValues ( MobileServiceUser user ) : System.Threading.Tasks.Task

Method Details

Authenticate() public method

Shows the Google authentication web view so the user can authenticate and gets the user's Google profile from Google API
public Authenticate ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

GetUserProfile() public method

public GetUserProfile ( MobileServiceAuthenticationProvider provider ) : Task
provider MobileServiceAuthenticationProvider
return Task

GetUserProfile() public method

Attempts to get the user profile from Google. Will use the refresh token if the auth token has expired Will set App.CurrentAthlete to the athlete data from Azure
public GetUserProfile ( ) : Task
return Task

LogOut() public method

public LogOut ( bool clearCookies ) : System.Threading.Tasks.Task
clearCookies bool
return System.Threading.Tasks.Task