28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
|
|
using System;
|
|
using System.Security.Claims;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Microsoft.AspNet.Identity
|
|
{
|
|
/// <summary>
|
|
/// Interface for creating a ClaimsIdentity from an user
|
|
/// </summary>
|
|
/// <typeparam name="TUser"></typeparam>
|
|
public interface IClaimsIdentityFactory<TUser>
|
|
where TUser : class
|
|
{
|
|
/// <summary>
|
|
/// Create a ClaimsIdentity from an user using a UserManager
|
|
/// </summary>
|
|
/// <param name="manager"></param>
|
|
/// <param name="user"></param>
|
|
/// <param name="authenticationType"></param>
|
|
/// <param name="cancellationToken"></param>
|
|
/// <returns></returns>
|
|
Task<ClaimsIdentity> CreateAsync(UserManager<TUser> manager, TUser user, string authenticationType, CancellationToken cancellationToken = default(CancellationToken));
|
|
}
|
|
} |