GoogleHelper Class

Contains static methods that allow to extract user’s information from a Newtonsoft.Json.Linq.JObject instance retrieved from Google after a successful authentication process.

Namespace
Microsoft.AspNetCore.Authentication.Google
Assemblies
  • Microsoft.AspNetCore.Authentication.Google

Syntax

public class GoogleHelper
class Microsoft.AspNetCore.Authentication.Google.GoogleHelper

Methods

GetEmail(Newtonsoft.Json.Linq.JObject)

Gets the user’s email.

Return type:System.String
public static string GetEmail(JObject user)
GetFamilyName(Newtonsoft.Json.Linq.JObject)

Gets the user’s family name.

Return type:System.String
public static string GetFamilyName(JObject user)
GetGivenName(Newtonsoft.Json.Linq.JObject)

Gets the user’s given name.

Return type:System.String
public static string GetGivenName(JObject user)
GetId(Newtonsoft.Json.Linq.JObject)

Gets the Google user ID.

Return type:System.String
public static string GetId(JObject user)
GetName(Newtonsoft.Json.Linq.JObject)

Gets the user’s name.

Return type:System.String
public static string GetName(JObject user)
GetProfile(Newtonsoft.Json.Linq.JObject)

Gets the user’s profile link.

Return type:System.String
public static string GetProfile(JObject user)