Class ExternalSignInAutoLinkOptions
Options used to configure auto-linking external OAuth providers
Inheritance
Namespace: Umbraco.Web.Security
Assembly: Umbraco.Web.dll
Syntax
public class ExternalSignInAutoLinkOptions
Constructors
View SourceExternalSignInAutoLinkOptions(Boolean, String[], String)
Creates a new ExternalSignInAutoLinkOptions instance
Declaration
public ExternalSignInAutoLinkOptions(bool autoLinkExternalAccount = false, string[] defaultUserGroups = null, string defaultCulture = null)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | autoLinkExternalAccount | |
System.String[] | defaultUserGroups | If null, the default will be the 'editor' group |
System.String | defaultCulture |
Properties
View SourceAllowManualLinking
By default this is true which allows the user to manually link and unlink the external provider, if set to false the back office user will not see and cannot perform manual linking or unlinking of the external provider.
Declaration
public bool AllowManualLinking { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
OnAutoLinking
A callback executed during account auto-linking and before the user is persisted
Declaration
[IgnoreDataMember]
public Action<BackOfficeIdentityUser, ExternalLoginInfo> OnAutoLinking { get; set; }
Property Value
Type | Description |
---|---|
System.Action<BackOfficeIdentityUser, 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<BackOfficeIdentityUser, ExternalLoginInfo, bool> OnExternalLogin { get; set; }
Property Value
Type | Description |
---|---|
System.Func<BackOfficeIdentityUser, ExternalLoginInfo, System.Boolean> |
Methods
View SourceGetDefaultCulture(UmbracoContext, ExternalLoginInfo)
The default Culture to use for auto-linking users
Declaration
public virtual string GetDefaultCulture(UmbracoContext umbracoContext, ExternalLoginInfo loginInfo)
Parameters
Type | Name | Description |
---|---|---|
UmbracoContext | umbracoContext | |
ExternalLoginInfo | loginInfo |
Returns
Type | Description |
---|---|
System.String |
GetDefaultUserGroups(UmbracoContext, ExternalLoginInfo)
The default User group aliases to use for auto-linking users
Declaration
public virtual string[] GetDefaultUserGroups(UmbracoContext umbracoContext, ExternalLoginInfo loginInfo)
Parameters
Type | Name | Description |
---|---|---|
UmbracoContext | umbracoContext | |
ExternalLoginInfo | loginInfo |
Returns
Type | Description |
---|---|
System.String[] |
ShouldAutoLinkExternalAccount(UmbracoContext, ExternalLoginInfo)
For private external auth providers such as Active Directory, which when set to true will automatically create a local user if the external provider login was successful.
For public auth providers this should always be false!!!
Declaration
public virtual bool ShouldAutoLinkExternalAccount(UmbracoContext umbracoContext, ExternalLoginInfo loginInfo)
Parameters
Type | Name | Description |
---|---|---|
UmbracoContext | umbracoContext | |
ExternalLoginInfo | loginInfo |
Returns
Type | Description |
---|---|
System.Boolean |