Class MemberExternalSignInAutoLinkOptions
Options used to configure auto-linking external OAuth providers
Inheritance
System.Object
Namespace: Umbraco.Cms.Web.Common.Security
Assembly: Umbraco.Web.Common.dll
Syntax
public class MemberExternalSignInAutoLinkOptions
Constructors
View SourceMemberExternalSignInAutoLinkOptions(Boolean, Boolean, String, String, Nullable<IEnumerable<String>>)
Initializes a new instance of the MemberExternalSignInAutoLinkOptions class.
Declaration
public MemberExternalSignInAutoLinkOptions(bool autoLinkExternalAccount = false, bool defaultIsApproved = true, string defaultMemberTypeAlias = null, string defaultCulture = null, IEnumerable<string>? defaultMemberGroups = null)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | autoLinkExternalAccount | |
System.Boolean | defaultIsApproved | |
System.String | defaultMemberTypeAlias | |
System.String | defaultCulture | |
System.Nullable<IEnumerable<System.String>> | defaultMemberGroups |
Properties
View SourceAutoLinkExternalAccount
Gets a value indicating whether flag indicating if logging in with the external provider should auto-link/create a local user
Declaration
public bool AutoLinkExternalAccount { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
DefaultIsApproved
Gets the IsApproved value for auto linked members.
Declaration
public bool DefaultIsApproved { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
DefaultMemberGroups
Gets the default member groups to add the user in.
Declaration
public IEnumerable<string> DefaultMemberGroups { get; }
Property Value
Type | Description |
---|---|
IEnumerable<System.String> |
DefaultMemberTypeAlias
Gets the member type alias that auto linked members are created as
Declaration
public string DefaultMemberTypeAlias { get; }
Property Value
Type | Description |
---|---|
System.String |
OnAutoLinking
A callback executed during account auto-linking and before the user is persisted
Declaration
[IgnoreDataMember]
public Action<MemberIdentityUser, ExternalLoginInfo>? OnAutoLinking { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<Action<MemberIdentityUser, Microsoft.AspNetCore.Identity.ExternalLoginInfo>> |
OnExternalLogin
A callback executed during every time a user authenticates using an external login. returns a boolean indicating if sign in should continue or not.
Declaration
[IgnoreDataMember]
public Func<MemberIdentityUser, ExternalLoginInfo, bool>? OnExternalLogin { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<Func<MemberIdentityUser, Microsoft.AspNetCore.Identity.ExternalLoginInfo, System.Boolean>> |
Methods
View SourceGetUserAutoLinkCulture(GlobalSettings)
The default Culture to use for auto-linking users
Declaration
public string GetUserAutoLinkCulture(GlobalSettings globalSettings)
Parameters
Type | Name | Description |
---|---|---|
GlobalSettings | globalSettings |
Returns
Type | Description |
---|---|
System.String |