Interface IExternalLoginService
Used to store the external login info
Namespace: Umbraco.Cms.Core.Services
Assembly: Umbraco.Core.dll
Syntax
public interface IExternalLoginService : IService
Methods
View SourceDeleteUserLogins(Int32)
Deletes all user logins - normally used when a member is deleted
Declaration
void DeleteUserLogins(int userId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | userId |
Find(String, String)
Returns all logins matching the login info - generally there should only be one but in some cases there might be more than one depending on if an administrator has been editing/removing members
Declaration
IEnumerable<IIdentityUserLogin> Find(string loginProvider, string providerKey)
Parameters
Type | Name | Description |
---|---|---|
System.String | loginProvider | |
System.String | providerKey |
Returns
Type | Description |
---|---|
IEnumerable<IIdentityUserLogin> |
GetExternalLogins(Int32)
Returns all user logins assigned
Declaration
IEnumerable<IIdentityUserLogin> GetExternalLogins(int userId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | userId |
Returns
Type | Description |
---|---|
IEnumerable<IIdentityUserLogin> |
GetExternalLoginTokens(Int32)
Returns all user login tokens assigned
Declaration
IEnumerable<IIdentityUserToken> GetExternalLoginTokens(int userId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | userId |
Returns
Type | Description |
---|---|
IEnumerable<IIdentityUserToken> |
Save(Int32, IEnumerable<IExternalLogin>)
Saves the external logins associated with the user
Declaration
void Save(int userId, IEnumerable<IExternalLogin> logins)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | userId | The user associated with the logins |
IEnumerable<IExternalLogin> | logins |
Remarks
This will replace all external login provider information for the user
Save(Int32, IEnumerable<IExternalLoginToken>)
Saves the external login tokens associated with the user
Declaration
void Save(int userId, IEnumerable<IExternalLoginToken> tokens)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | userId | The user associated with the tokens |
IEnumerable<IExternalLoginToken> | tokens |
Remarks
This will replace all external login tokens for the user