View Source
Class AuthenticationController
The API controller used for editing content
Inheritance
System.Object
Assembly: Umbraco.Web.dll
Syntax
[PluginController("UmbracoApi")]
public class AuthenticationController : UmbracoApiController, IDiscoverable
Constructors
View Source
AuthenticationController(IGlobalSettings, IUmbracoContextAccessor, ISqlContext, ServiceContext, AppCaches, IProfilingLogger, IRuntimeState, UmbracoHelper, IUmbracoSettingsSection)
Declaration
public AuthenticationController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoHelper umbracoHelper, IUmbracoSettingsSection umbracoSettingsSection)
Parameters
Properties
View Source
SignInManager
Declaration
protected BackOfficeSignInManager SignInManager { get; }
Property Value
View Source
UserManager
Declaration
protected BackOfficeUserManager<BackOfficeIdentityUser> UserManager { get; }
Property Value
Methods
View Source
Get2FAProviders()
Used to retrieve the 2FA providers for code submission
Declaration
public async Task<IEnumerable<string>> Get2FAProviders()
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<System.String>> |
|
View Source
GetCurrentInvitedUser()
When a user is invited they are not approved but we need to resolve the partially logged on (non approved)
user.
Declaration
public UserDetail GetCurrentInvitedUser()
Returns
View Source
GetCurrentUser()
Returns the currently logged in Umbraco user
Declaration
public UserDetail GetCurrentUser()
Returns
View Source
GetCurrentUserLinkedLogins()
Declaration
public async Task<Dictionary<string, string>> GetCurrentUserLinkedLogins()
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.Dictionary<System.String, System.String>> |
|
View Source
GetMembershipProviderConfig()
Returns the configuration for the backoffice user membership provider - used to configure the change password dialog
Declaration
public IDictionary<string, object> GetMembershipProviderConfig()
Returns
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Object> |
|
View Source
IsAuthenticated()
Checks if the current user's cookie is valid and if so returns OK or a 400 (BadRequest)
Declaration
public bool IsAuthenticated()
Returns
Type |
Description |
System.Boolean |
|
View Source
PostLogin(LoginModel)
Declaration
public async Task<HttpResponseMessage> PostLogin(LoginModel loginModel)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<HttpResponseMessage> |
|
View Source
PostLogout()
Logs the current user out
Declaration
public HttpResponseMessage PostLogout()
Returns
Type |
Description |
HttpResponseMessage |
|
View Source
PostRequestPasswordReset(RequestPasswordResetModel)
Processes a password reset request. Looks for a match on the provided email address
and if found sends an email with a link to reset it
Declaration
public async Task<HttpResponseMessage> PostRequestPasswordReset(RequestPasswordResetModel model)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<HttpResponseMessage> |
|
View Source
PostSend2FACode(String)
Declaration
public async Task<IHttpActionResult> PostSend2FACode(string provider)
Parameters
Type |
Name |
Description |
System.String |
provider |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<IHttpActionResult> |
|
View Source
PostSetPassword(SetPasswordModel)
Processes a set password request. Validates the request and sets a new password.
Declaration
public async Task<HttpResponseMessage> PostSetPassword(SetPasswordModel model)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<HttpResponseMessage> |
|
View Source
PostUnLinkLogin(UnLinkLoginModel)
Declaration
public async Task<HttpResponseMessage> PostUnLinkLogin(UnLinkLoginModel unlinkLoginModel)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<HttpResponseMessage> |
|
View Source
PostVerify2FACode(Verify2FACodeModel)
Declaration
public async Task<HttpResponseMessage> PostVerify2FACode(Verify2FACodeModel model)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<HttpResponseMessage> |
|
View Source
PostVerifyInvite(Int32, String)
Checks if a valid token is specified for an invited user and if so logs the user in and returns the user object
Declaration
public async Task<UserDisplay> PostVerifyInvite(int id, string token)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
System.String |
token |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<UserDisplay> |
|