mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-08-20 10:06:07 +08:00
Merge 17bd09354d into c38c9bf398
This commit is contained in:
commit
80701867ae
@ -72,11 +72,12 @@ namespace Orchard.OpenId.Controllers
|
||||
}
|
||||
|
||||
var membershipSettings = _membershipService.GetSettings();
|
||||
|
||||
if (user != null &&
|
||||
membershipSettings.EnableCustomPasswordPolicy &&
|
||||
membershipSettings.EnablePasswordExpiration &&
|
||||
_membershipService.PasswordIsExpired(user, membershipSettings.PasswordExpirationTimeInDays)) {
|
||||
return RedirectToAction("ChangeExpiredPassword", new { username = user.UserName });
|
||||
return RedirectToAction("ChangeExpiredPassword", "Account", new { Area = "Orchard.Users", username = user.UserName });
|
||||
}
|
||||
|
||||
_authenticationService.SignIn(user, rememberMe);
|
||||
|
||||
@ -5,7 +5,7 @@ using System.Web.Routing;
|
||||
using Orchard.Mvc.Routes;
|
||||
using Orchard.OpenId.Services;
|
||||
|
||||
namespace Orchard.Azure.Authentication {
|
||||
namespace Orchard.OpenId.Routes {
|
||||
public class OpenIdRoutes : IRouteProvider {
|
||||
private readonly IEnumerable<IOpenIdProvider> _openIdProviders;
|
||||
|
||||
@ -37,6 +37,57 @@ namespace Orchard.Azure.Authentication {
|
||||
},
|
||||
new RouteDescriptor {
|
||||
Priority = 10,
|
||||
Route = new Route(
|
||||
"Users/Account/LogOn",
|
||||
new RouteValueDictionary {
|
||||
{"area", "Orchard.OpenId"},
|
||||
{"controller", "Account"},
|
||||
{"action","LogOn" }
|
||||
},
|
||||
new RouteValueDictionary(),
|
||||
new RouteValueDictionary {
|
||||
{"area", "Orchard.OpenId"},
|
||||
{"controller", "Account"},
|
||||
{"action","LogOn" }
|
||||
},
|
||||
new MvcRouteHandler())
|
||||
},
|
||||
new RouteDescriptor {
|
||||
Priority = 10,
|
||||
Route = new Route(
|
||||
"Users/Account/LogOff",
|
||||
new RouteValueDictionary {
|
||||
{"area", "Orchard.OpenId"},
|
||||
{"controller", "Account"},
|
||||
{"action","LogOff" }
|
||||
},
|
||||
new RouteValueDictionary(),
|
||||
new RouteValueDictionary {
|
||||
{"area", "Orchard.OpenId"},
|
||||
{"controller", "Account"},
|
||||
{"action","LogOff" }
|
||||
},
|
||||
new MvcRouteHandler())
|
||||
},
|
||||
new RouteDescriptor {
|
||||
Priority = 10,
|
||||
Route = new Route(
|
||||
"Users/Account/AccessDenied",
|
||||
new RouteValueDictionary {
|
||||
{"area", "Orchard.OpenId"},
|
||||
{"controller", "Account"},
|
||||
{"action","AccessDenied" }
|
||||
},
|
||||
new RouteValueDictionary(),
|
||||
new RouteValueDictionary {
|
||||
{"area", "Orchard.OpenId"},
|
||||
{"controller", "Account"},
|
||||
{"action","AccessDenied" }
|
||||
},
|
||||
new MvcRouteHandler())
|
||||
},
|
||||
new RouteDescriptor {
|
||||
Priority = -20,
|
||||
Route = new Route(
|
||||
"Users/Account/{action}",
|
||||
new RouteValueDictionary {
|
||||
@ -50,6 +101,7 @@ namespace Orchard.Azure.Authentication {
|
||||
},
|
||||
new MvcRouteHandler())
|
||||
},
|
||||
|
||||
new RouteDescriptor {
|
||||
Priority = 10,
|
||||
Route = new Route(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user