-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created new abstraction IUmbracoWebsiteSecurity and migrated controll…
…er's using it (replacing MembershipHelper) to Umbraco.Web.Website.
- Loading branch information
1 parent
6460947
commit 0fbe01c
Showing
20 changed files
with
235 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Umbraco.Core/Models/PostRedirectModel.cs → ...Core/Models/Security/PostRedirectModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Umbraco.Core.Models.Security; | ||
|
||
namespace Umbraco.Core.Security | ||
{ | ||
public interface IUmbracoWebsiteSecurity | ||
{ | ||
// TODO: this should return the member, but in what form? MembershipUser is in place on MembershipHelper, but | ||
// isn't appropriate for when we're using ASP.NET Identity. | ||
void RegisterMember(RegisterModel model, out RegisterMemberStatus status, bool logMemberIn = true); | ||
|
||
// TODO: again, should this return the member? | ||
void UpdateMemberProfile(ProfileModel model, out UpdateMemberProfileStatus status, out string errorMessage); | ||
|
||
bool Login(string username, string password); | ||
|
||
bool IsLoggedIn(); | ||
|
||
void LogOut(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace Umbraco.Core.Security | ||
{ | ||
public enum RegisterMemberStatus | ||
{ | ||
Success, | ||
InvalidUserName, | ||
InvalidPassword, | ||
InvalidEmail, | ||
DuplicateUserName, | ||
DuplicateEmail, | ||
Error, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace Umbraco.Core.Security | ||
{ | ||
public enum UpdateMemberProfileStatus | ||
{ | ||
Success, | ||
Error, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 19 additions & 23 deletions
42
...aco.Web/Controllers/UmbLoginController.cs → ...Website/Controllers/UmbLoginController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.