Files
RavenDB.Identity/Sample/Extensions/UrlHelperExtensions.cs
T

30 lines
949 B
C#
Raw Normal View History

2017-08-29 15:42:24 -05:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Sample.Controllers;
namespace Microsoft.AspNetCore.Mvc
{
public static class UrlHelperExtensions
{
public static string EmailConfirmationLink(this IUrlHelper urlHelper, string userId, string code, string scheme)
{
return urlHelper.Action(
action: nameof(AccountController.ConfirmEmail),
controller: "Account",
values: new { userId, code },
protocol: scheme);
}
public static string ResetPasswordCallbackLink(this IUrlHelper urlHelper, string userId, string code, string scheme)
{
return urlHelper.Action(
action: nameof(AccountController.ResetPassword),
controller: "Account",
values: new { userId, code },
protocol: scheme);
}
}
}