Show / Hide Table of Contents

Class GravatarUserPictureProvider

A user picture provider that uses the Gravatar service (gravatar.com).

Inheritance
Object
GravatarUserPictureProvider
GravatarAndInitialsUserPictureProvider
Inherited Members
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: IRM.AspNetCore.Identity
Assembly: IRM.AspNetCore.Identity.dll
Syntax
public class GravatarUserPictureProvider : IUserPictureProvider

Fields

FallbackUrl

Gets a default fallback url.

Declaration
protected const string FallbackUrl = "https://upload.wikimedia.org/wikipedia/commons/c/ca/1x1.png"
Field Value
String

Methods

GetFallbackPictureUrl(String)

Gets a fallback url to a picture for a user, if GetUserPictureUrl(IUserIdentifiers, String) doesn't work..

Declaration
public virtual string GetFallbackPictureUrl(string initials = null)
Parameters
String initials

Optionally the name initials for the user.

Returns
String

A url to a fallback picture for a user, or null if the user does not have a picture.

Implements
IUserPictureProvider.GetFallbackPictureUrl(String)

GetGravatarHash(IUserIdentifiers)

Generates an MD5 hash for use against the Gravatr service for the given user.

Declaration
protected string GetGravatarHash(IUserIdentifiers user)
Parameters
IUserIdentifiers user

Returns
String

GetPublicFallbackPictureUrl(String)

Gets a public reachable fallback url.

Declaration
protected virtual string GetPublicFallbackPictureUrl(string initials = null)
Parameters
String initials

Returns
String

GetUserPictureUrl(IUserIdentifiers, String)

Gets a url to a picture for a user.

Declaration
public virtual Task<string> GetUserPictureUrl(IUserIdentifiers user, string initials = null)
Parameters
IUserIdentifiers user

The user to get a picture url for.

String initials

Optionally the name initials for the user.

Returns
System.Threading.Tasks.Task<String>

A url to a picture for a user, or null if the user does not have a picture.

Implements
IUserPictureProvider.GetUserPictureUrl(IUserIdentifiers, String)
Back to top Generated by DocFX