forked from gongxuegit/tiku-backend.net
feat: modularize external providers
This commit is contained in:
23
Tiku.Application/Auth/IIdentityProvider.cs
Normal file
23
Tiku.Application/Auth/IIdentityProvider.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace Tiku.Application.Auth;
|
||||
|
||||
public sealed record IdentityProviderRequest(
|
||||
Guid TenantId,
|
||||
string Provider,
|
||||
string Identifier,
|
||||
string Secret,
|
||||
string? IpAddress,
|
||||
string? UserAgent);
|
||||
|
||||
public sealed record IdentityProviderResult(
|
||||
string Provider,
|
||||
string Subject,
|
||||
string? Phone,
|
||||
string? Email,
|
||||
string? DisplayName);
|
||||
|
||||
public interface IIdentityProvider
|
||||
{
|
||||
Task<IdentityProviderResult> AuthenticateAsync(
|
||||
IdentityProviderRequest request,
|
||||
CancellationToken cancellationToken = default);
|
||||
}
|
||||
Reference in New Issue
Block a user